Hi,
I don't know if it's only me, but youtube videos are not playing in the current CEF version ; the audio plays but the video shows a blank screen, any youtube url / video.
Any hints ?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Youtube not working on current version
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Youtube not working on current version
Hi,
I just tested some YouTube videos with BriskBard and MiniBrowser in Windows 7 and 10, and it works fine.
Please check that you have the latest drivers for your graphics card.
Long ago someone mentioned that a second graphics card caused some issues and he had to disable it.
I would also test the app in the main monitor in case you have more than one monitor.
I just tested some YouTube videos with BriskBard and MiniBrowser in Windows 7 and 10, and it works fine.
Please check that you have the latest drivers for your graphics card.
Long ago someone mentioned that a second graphics card caused some issues and he had to disable it.
I would also test the app in the main monitor in case you have more than one monitor.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: Youtube not working on current version
Ok, will check that.
Another strange thing i noticed, autoplay won't work on CEF4. For instance, if i navigate to the link below :
https://www.youtube.com/watch?v=lOK0-oJSx8k&autoplay=1
The video will start play as soon as the url loads. If i open the same link on TChromium, it won't start playing automatically, i need to manually click on play button.
Another strange thing i noticed, autoplay won't work on CEF4. For instance, if i navigate to the link below :
https://www.youtube.com/watch?v=lOK0-oJSx8k&autoplay=1
The video will start play as soon as the url loads. If i open the same link on TChromium, it won't start playing automatically, i need to manually click on play button.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Youtube not working on current version
Short answer : Set GlobalCEFApp.AutoplayPolicy to appNoUserGestureRequired and it plays the video automatically.
Long answer :
By default, GlobalCEFApp.AutoplayPolicy has a "appDefault" value which means that it doesn't add a "--autoplay-policy" switch as you can see here :
https://github.com/salvadordf/CEF4Delph ... .pas#L1569
I checked the Chromium source and they have changed the possible values for that switch :
https://chromium.googlesource.com/chrom ... witches.cc
In previous versions you could use these values for the "--autoplay-policy" switch :
Long answer :
By default, GlobalCEFApp.AutoplayPolicy has a "appDefault" value which means that it doesn't add a "--autoplay-policy" switch as you can see here :
https://github.com/salvadordf/CEF4Delph ... .pas#L1569
I checked the Chromium source and they have changed the possible values for that switch :
https://chromium.googlesource.com/chrom ... witches.cc
In previous versions you could use these values for the "--autoplay-policy" switch :
- document-user-activation-required
- no-user-gesture-required
- user-gesture-required
- user-gesture-required-for-cross-origin
- "document-user-activation-required" : Autoplay policy that requires a document user activation.
- "no-user-gesture-required" : Autoplay policy that does not require any user gesture.
- "user-gesture-required" : Autoplay policy to require a user gesture in order to play.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: Youtube not working on current version
Great, it worked !
Thank you again !
Thank you again !
