-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: player external play #338
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, however, testing under Firefox gives me a few problems:
https://user-images.githubusercontent.com/8925621/228165968-f0ec296b-ba93-4035-a138-3a70db8c7c2e.mp4
- I couldn't find a single stream that is supported 😅
2. Clicking on the 3 dots menu, I get multiple errors in the console and I get redirected to:
link
Errors:
Uncaught TypeError: streamingServer.playbackDevices is undefined
The above error occurred in the <Player> component
Uncaught TypeError: core.transport is null
The above error occurred in the <ServicesToaster> component
The issues above were caused by not running npm install
before testing the PR.
Sorry about that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tested with VLC.
<Option | ||
key={id} | ||
icon={'ic_vlc'} | ||
label={`Play in ${name}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should be translated in future PR
streamingUrl || downloadUrl ? | ||
<Option | ||
icon={'ic_link'} | ||
label={'Copy Stream Link'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should be translated in future PR
@@ -38,55 +38,78 @@ const OptionsMenu = ({ className, stream }) => { | |||
toast.show({ | |||
type: 'error', | |||
title: 'Error', | |||
message: `Failed to copy stream link: ${streamUrl}`, | |||
message: `Failed to copy stream link: ${streamingUrl || downloadUrl}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should be translated in future PR?!
case 'PlayingOnDevice': { | ||
toast.show({ | ||
type: 'success', | ||
title: `Stream opened in ${args.device}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should be translated in future PR
const { Button } = require('stremio/common'); | ||
const styles = require('./styles'); | ||
|
||
const Option = ({ icon, label, deviceId, disabled, onClick }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
We should add some docs for parameters, e.g.:As discussed this is already very clear and will be much clearer if we switch to TypescriptonClick
should takedeviceId
parameterlabel
should be a translated string as the component doesn't translates it- etc.
Related PRs and Issues
Stremio/stremio-core#421
Stremio/stremio-core#427
Stremio/stremio-core-web#40closed in favour of Stremio/stremio-core-web#41Feature
Add options to open streams in external players