-
Notifications
You must be signed in to change notification settings - Fork 113
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
Fix: update autoplay behavior #461
Conversation
@@ -183,7 +183,7 @@ class Settings extends EventEmitter { | |||
this.containerEl.classList.add(CLASS_SETTINGS_SUBTITLES_UNAVAILABLE); | |||
this.containerEl.classList.add(CLASS_SETTINGS_AUDIOTRACKS_UNAVAILABLE); | |||
|
|||
if (Browser.isIOS()) { | |||
if (Browser.isMobile()) { |
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.
Chrome doesn't allow play without a user action and setting the autoplay tag is not respected, so i've turned off autoplay for mobile in general. https://developers.google.com/web/updates/2016/07/autoplay
src/lib/Preview.js
Outdated
@@ -905,6 +905,9 @@ class Preview extends EventEmitter { | |||
case 'notificationhide': | |||
this.ui.hideNotification(); | |||
break; | |||
case 'previewnextfile': |
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.
I'm thinking this should be mediaend
related and not previewnextfile
because in the future we may not want to preview the next file if it is not a media file.
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.
Generally, the message you broadcast should be for what happened, not what you want to happen, and then the subscriber then determines what it wants to do.
I'm thinking something like... mediaendautoplay
? mediaend
to me could be fired as an event that has nothing to do with autoplay, so appending autoplay makes it a bit more specific
src/lib/Preview.js
Outdated
@@ -905,6 +905,9 @@ class Preview extends EventEmitter { | |||
case 'notificationhide': | |||
this.ui.hideNotification(); | |||
break; | |||
case 'previewnextfile': |
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.
Generally, the message you broadcast should be for what happened, not what you want to happen, and then the subscriber then determines what it wants to do.
I'm thinking something like... mediaendautoplay
? mediaend
to me could be fired as an event that has nothing to do with autoplay, so appending autoplay makes it a bit more specific
No description provided.