Media auto-play behavior

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Locked
superA
Lunatic
Lunatic
Posts: 310
Joined: 2014-07-03, 12:34
Location: Greece

Media auto-play behavior

Post by superA » 2015-10-27, 17:42

When set media.autoplay.enabled to false, youtube videos dont start for me (''restart your device'' message).

megaman

Re: Pale Moon 26 public beta 3 feedback thread

Post by megaman » 2015-10-27, 17:47

superA wrote:When set media.autoplay.enabled to false, youtube videos dont start for me (''restart your device'' message).
That's odd, it works fine for me. Been testing for over a few days.
First time ever seeing "Restart your device" as a message on YouTube.

superA
Lunatic
Lunatic
Posts: 310
Joined: 2014-07-03, 12:34
Location: Greece

Re: Pale Moon 26 public beta 3 feedback thread

Post by superA » 2015-10-27, 18:00


User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29243
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Pale Moon 26 public beta 3 feedback thread

Post by Moonchild » 2015-10-27, 21:39

superA wrote:When set media.autoplay.enabled to false, youtube videos dont start for me (''restart your device'' message).
I just tested this and apart from the expected "you have to click pause and then play again" to start the video (due to the scripted autoplay being blocked and the custom youtube player not understanding this) the video plays just fine. No "restart your device" message.

You have to understand that media.autoplay.enabled will now not only block standard element autoplay, but also autoplay triggered by scripts as long as you have not interacted with the element on the page yet.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

superA
Lunatic
Lunatic
Posts: 310
Joined: 2014-07-03, 12:34
Location: Greece

Re: Pale Moon 26 public beta 3 feedback thread

Post by superA » 2015-10-27, 22:10

Moonchild wrote:
superA wrote:When set media.autoplay.enabled to false, youtube videos dont start for me (''restart your device'' message).
I just tested this and apart from the expected "you have to click pause and then play again" to start the video (due to the scripted autoplay being blocked and the custom youtube player not understanding this) the video plays just fine. No "restart your device" message.

You have to understand that media.autoplay.enabled will now not only block standard element autoplay, but also autoplay triggered by scripts as long as you have not interacted with the element on the page yet.
Understood.
Yes, clicking pause and play again, do the trick, or manually move the red bar.
media.autoplay, default again.

megaman

Re: Pale Moon 26 public beta 3 feedback thread

Post by megaman » 2015-10-27, 23:53

superA wrote:Understood.
Yes, clicking pause and play again, do the trick, or manually move the red bar.
media.autoplay, default again.
Yes, that's how I got it to play, 2 days ago, but I never got the message.
I'll stop saying more, since it's a "Me, too" type of reply.

User avatar
LimboSlam
Board Warrior
Board Warrior
Posts: 1029
Joined: 2014-06-09, 04:43
Location: USA

Re: Pale Moon 26 public beta 3 feedback thread

Post by LimboSlam » 2015-10-28, 04:32

Ok, so autoplay works as the way Firefox does and is even more working perfectly here: http://www.pcworld.com/article/2858421/how-to-stop-autoplay-videos.html. This is one the websites that gave me and others lots of problems.

And well, now YouTube decides to go full HTML5 on me. Shit! Maybe I shouldn't have cleared my cookies and cache!?
With Pale Moon by my side, surfing the web is quite enjoyable and takes my headaches away! :)
God is not punishing you, He is preparing you. Trust His plan, not your pain.#‎TrentShelton #‎RehabTime

User avatar
LimboSlam
Board Warrior
Board Warrior
Posts: 1029
Joined: 2014-06-09, 04:43
Location: USA

Re: Pale Moon 26 public beta 3 feedback thread

Post by LimboSlam » 2015-10-28, 05:10

Already have, flash working good and media.autoplay.enabled set to false is working as should be. Sorry for the over reaction. :)

Thanks! :) :thumbup:
With Pale Moon by my side, surfing the web is quite enjoyable and takes my headaches away! :)
God is not punishing you, He is preparing you. Trust His plan, not your pain.#‎TrentShelton #‎RehabTime

orodeshah

Re: Pale Moon 26 public beta 3 feedback thread

Post by orodeshah » 2015-10-28, 06:23

Pale Moon 26.0.0, public beta 3 => I have changed media autoplay in config to false , when I open youtube, in first page it will NOT be auto played , but from that point any youtube page I open it will be played automatically, while in firefox when Media Autoplay is false, for every new youtube page media is stopped ....

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29243
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Pale Moon 26 public beta 3 feedback thread

Post by Moonchild » 2015-10-28, 10:10

orodeshah wrote:Pale Moon 26.0.0, public beta 3 => I have changed media autoplay in config to false , when I open YouTube, in first page it will NOT be auto played , but from that point any youtube page I open it will be played automatically, while in firefox when Media Autoplay is false, for every new YouTube page media is stopped ....
media.autoplay.enabled to false is designed to stop elements from auto-playing on new pages loaded. It's not intended to be a replacement of player controls, but a measure to prevent media from automatically playing for just loading a web page without interacting with it.

Once you interact with the player on YouTube, it's flagged as you having chosen to let this element play script-triggered video-play events (which is how YouTube's custom player plays video; you interact with a control, the control runs a script, and the script plays the video) including dynamically loading additional content and playing it. This element state is not changed by a dynamic update of its content because you already interacted with it. So it's expected behavior for Pale Moon's implementation and outside of the scope of this preference.

I'll be splitting this media auto-play story off into its own thread, because it's not necessarily a bug in the browser or this beta.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29243
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Media auto-play behavior

Post by Moonchild » 2015-10-28, 10:22

Looking into this a little more: the message "restart your device" occurs if YouTube's player sees that it is not actually playing video (after a certain time-out) when according to its state, it should be. That is purely a YouTube player issue, and if they can detect it's not playing, they could also not assume it's necessarily a technical playback issue ;)

It especially occurs on videos where the regular controls are hidden (that are assumed to auto-play as embedded and similar). Clicking the content twice (once to pause, once more to resume) will start the video because play is allowed at that point.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

RJARRRPCGP
Lunatic
Lunatic
Posts: 391
Joined: 2015-06-22, 19:48
Location: USA (North Springfield, Vermont)
Contact:

Re: Media auto-play behavior

Post by RJARRRPCGP » 2015-10-29, 02:23

Moonchild wrote: if YouTube's player sees that it is not actually playing video (after a certain time-out)
Don't that usually cause the dreaded black screen of death error "An error occurred, please try again later Learn More"? (or similar)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29243
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Media auto-play behavior

Post by Moonchild » 2015-10-29, 02:43

Not necessarily. It's a different kind of issue than a networking one (which would cause the "an error occurred try again later" message in many cases) since there is no issue loading or buffering, but it isn't actually seeing time progression, and that obviously triggers a different error message.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

Koshmaar

Re: Pale Moon 26 public beta 3 feedback thread

Post by Koshmaar » 2015-11-07, 13:06

Moonchild wrote: media.autoplay.enabled to false is designed to stop elements from auto-playing on new pages loaded. It's not intended to be a replacement of player controls, but a measure to prevent media from automatically playing for just loading a web page without interacting with it.

Once you interact with the player on YouTube, it's flagged as you having chosen to let this element play script-triggered video-play events (which is how YouTube's custom player plays video; you interact with a control, the control runs a script, and the script plays the video) including dynamically loading additional content and playing it. This element state is not changed by a dynamic update of its content because you already interacted with it. So it's expected behavior for Pale Moon's implementation and outside of the scope of this preference.

I'll be splitting this media auto-play story off into its own thread, because it's not necessarily a bug in the browser or this beta.
Hmm, Moonchild I want to ask about this or something related. When I restart Palemoon (latest 25.7.3) it will auto-play all the Youtube videos in all tabs. I searched for plugins to disable that, but they don't work. I set plugins.click_to_play to false and this media.autoplay.enabled to false, but still they start playing. I have to hunt for every tab and manually stop them, which is extremely irritating. Do you see a way to control this behaviour in Palemoon?

megaman

Re: Pale Moon 26 public beta 3 feedback thread

Post by megaman » 2015-11-07, 14:09

Koshmaar wrote:Do you see a way to control this behaviour in Palemoon?
You only need to change media.autoplay.enabled to false.
The thing is that it wasn't fixed for this version, it is fixed for the 26 Beta, which is freely-available to the public.
Until then, you need an add-on, like YouTube Center, YouTube High Defintion, Magic Actions for YouTube, etc.

Supernova

Re: Media auto-play behavior

Post by Supernova » 2015-11-07, 15:06

megaman > We are in the beta thread, so I would guess it is what he used ?

megaman

Re: Media auto-play behavior

Post by megaman » 2015-11-07, 15:47

Supernova wrote:megaman > We are in the beta thread, so I would guess it is what he used ?
It is not, this is torn-off the BETA Thread into its own topic, and the particular topic in the BETA was fused with a current-standing topic.
Scroll-up and see the title, it is on the Development board, though.

Locked