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

ExoPlayer: Fix playlists (like intros) not working #111

Merged
merged 3 commits into from
Sep 9, 2020

Conversation

Maxr1998
Copy link
Member

@Maxr1998 Maxr1998 commented Sep 9, 2020

No description provided.

@Maxr1998 Maxr1998 added bug Something isn't working exoplayer Related to the ExoPlayer integration labels Sep 9, 2020
@nielsvanvelzen
Copy link
Member

It worked partially for me. It worked when playing from the details page but not from the home screen.

externalplayer.js?v=9:32 Uncaught (in promise) TypeError: Cannot read property '0' of undefined
    at Object.self.canPlayItem (externalplayer.js?v=9:32)
    at playbackmanager.js?v=9:1
    at Array.filter (<anonymous>)
    at getPlayer (playbackmanager.js?v=9:1)
    at Object.onPlaybackStopped (playbackmanager.js?v=9:1)
    at bundle.js?v=9:266
    at Array.forEach (<anonymous>)
    at Object.trigger (bundle.js?v=9:266)
    at exoplayer.js?v=9:167
    at new Promise (<anonymous>)

I fixed that, but now I found another bug. When playing something and pressing the back button (in the Android navigation bar) to stop the current playing item the web ui will automatically open it again.

@nielsvanvelzen
Copy link
Member

Actually, what happens is when playing a series from the start. When stopping the player at episode 2 the webui will start episode 3. It does this until the playlist is empty.

@Maxr1998
Copy link
Member Author

Maxr1998 commented Sep 9, 2020

It worked partially for me. It worked when playing from the details page but not from the home screen.

externalplayer.js?v=9:32 Uncaught (in promise) TypeError: Cannot read property '0' of undefined
    at Object.self.canPlayItem (externalplayer.js?v=9:32)
    at playbackmanager.js?v=9:1
    at Array.filter (<anonymous>)
    at getPlayer (playbackmanager.js?v=9:1)
    at Object.onPlaybackStopped (playbackmanager.js?v=9:1)
    at bundle.js?v=9:266
    at Array.forEach (<anonymous>)
    at Object.trigger (bundle.js?v=9:266)
    at exoplayer.js?v=9:167
    at new Promise (<anonymous>)

Wait, that's something else though.. something in external player. If you want, I can include the fix still into this PR.

I fixed that, but now I found another bug.

I'd appreciate if you could send me the fix then. My JS skills are quite bad..

When playing something and pressing the back button (in the Android navigation bar) to stop the current playing item the web ui will automatically open it again.

Can't reproduce that. Weird.

@CarlosOlivo
Copy link
Contributor

Actually, what happens is when playing a series from the start. When stopping the player at episode 2 the webui will start episode 3. It does this until the playlist is empty.

If you mean the externalplayer it is correct, since there is no way to play a playlist directly in an external player on Android (unless the player supports it), you can only know when a single element starts and ends due to the limitations of the Intent Actions Results

A workaround would be to treat the playback list as in Chromecast or as in music player like this that plays the next element automatically but I don't know how to do it

@Maxr1998
Copy link
Member Author

Maxr1998 commented Sep 9, 2020

I think external player should be able to function similiarly as the ExoPlayer now, just starting the next video after playback ended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exoplayer Related to the ExoPlayer integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants