--- CAST FILE ---
| 725 | |
| 726 | // --- CAST FILE --- |
| 727 | void MainWindow::castFile() { |
| 728 | uint32_t handle; |
| 729 | if (!remoteEnsureConnected(handle)) { return; } |
| 730 | |
| 731 | // Open file. |
| 732 | QString filename = QFileDialog::getOpenFileName(this, tr("Open media file")); |
| 733 | if (filename.isEmpty()) { return; } |
| 734 | |
| 735 | if (client.castFile(handle, filename.toStdString())) { |
| 736 | // Playing back file now. Update status. |
| 737 | playingTrack = true; |
| 738 | singleCast = true; |
| 739 | } |
| 740 | else { |
| 741 | QMessageBox::warning(this, tr("Failed to cast file"), tr("The selected file could not be played back.")); |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | |
| 746 | // --- CAST URL --- |