Skip to content
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

Merged
merged 9 commits into from
May 23, 2023
Merged

Conversation

tymmesyde
Copy link
Member

@tymmesyde tymmesyde commented Jan 12, 2023

Related PRs and Issues

Stremio/stremio-core#421
Stremio/stremio-core#427
Stremio/stremio-core-web#40 closed in favour of Stremio/stremio-core-web#41

Feature

Add options to open streams in external players

image

Copy link
Member

@elpiel elpiel left a 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

  1. 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!

@tymmesyde tymmesyde marked this pull request as draft March 28, 2023 08:06
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@tymmesyde tymmesyde marked this pull request as ready for review April 7, 2023 14:55
Copy link
Member

@elpiel elpiel left a 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}`}
Copy link
Member

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'}
Copy link
Member

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}`,
Copy link
Member

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}`,
Copy link
Member

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 }) => {
Copy link
Member

@elpiel elpiel Apr 20, 2023

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 Typescript
    • onClick should take deviceId parameter
    • label should be a translated string as the component doesn't translates it
    • etc.

@tymmesyde tymmesyde merged commit f1924e2 into development May 23, 2023
@nklhtv nklhtv deleted the feat/player-external-play branch May 25, 2023 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants