mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 10:39:57 +00:00
Fix browser receiver selector file media handling
This commit is contained in:
@@ -183,17 +183,14 @@ class PopupApp extends Component<{}, PopupAppState> {
|
|||||||
const mediaType = parseInt(ev.target.value);
|
const mediaType = parseInt(ev.target.value);
|
||||||
|
|
||||||
if (mediaType === ReceiverSelectorMediaType.File) {
|
if (mediaType === ReceiverSelectorMediaType.File) {
|
||||||
try {
|
const fileUrl = window.prompt();
|
||||||
const filePath = window.prompt();
|
if (fileUrl) {
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
mediaType
|
mediaType
|
||||||
, filePath
|
, filePath: fileUrl.href
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (err) {
|
|
||||||
// Don't need to handle any errors
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set media type to default if failed to set filePath
|
// Set media type to default if failed to set filePath
|
||||||
|
|||||||
Reference in New Issue
Block a user