Page 1 of 1

IMDB video in WebGadget

Posted: Sat Nov 03, 2018 10:42 am
by firace
The video plays just fine but I can't use the controls (pause / forward / rewind / etc)
Any idea why? It does work fine in IE11, though...

Code: Select all

Define.s regkeyName, dwLabel, statusMsg, keyResult.i
Define.l dwValue, dwValueCheck

regkeyName    = "Software\Microsoft\Internet Explorer\Main\FeatureControl\Feature_Browser_Emulation\"
dwLabel = GetFilePart(ProgramFilename())

dwValue = 11001 
RegOpenKeyEx_(#HKEY_CURRENT_USER, regkeyName,  0, #KEY_ALL_ACCESS, @keyResult) 
RegSetValueEx_(keyResult, @dwLabel, 0, #REG_DWORD, @dwValue, SizeOf(Long))


OpenWindow(0, 0, 0, 800,440, "", #PB_Window_SystemMenu)
WebGadget(0, 0, 0,  800, 440, "https://www.imdb.com/list/ls025720609/videoplayer/vi3918510617?ref_=hm_hp_i_1")

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow 

Re: IMDB video in WebGadget

Posted: Sat Nov 03, 2018 11:45 am
by Dude

Code: Select all

Software\Microsoft\Internet Explorer\Main\FeatureControl\Feature_Browser_Emulation
I've seen this Registry value being mentioned before. My concern is: if our apps modify it, aren't we affecting the browser for other apps running on the PC? Surely changing a global setting that like isn't a good idea? What right does our app have to modify the PC for all other apps? What if another app doesn't want browser emulation enabled?

BTW, that snippet doesn't even work on XP... the WebGadget() just says the page cannot be displayed. So how reliable is it anyway?

Re: IMDB video in WebGadget

Posted: Sat Nov 03, 2018 11:48 am
by Bisonte
Dude wrote:

Code: Select all

Software\Microsoft\Internet Explorer\Main\FeatureControl\Feature_Browser_Emulation
I've seen this Registry value being mentioned before. My concern is: if our apps modify it, aren't we affecting the browser for other apps running on the PC? Surely changing a global setting that like isn't a good idea? What right does our app have to modify the PC for all other apps? What if another app doesn't want browser emulation enabled?
At this registry entry, only the filename of your executable is store(added), so nothing will modify other apps/programs.
If this file use the IE-Control, so it's running with given emulation. Nothing more... nothing less....

Re: IMDB video in WebGadget

Posted: Sat Nov 03, 2018 11:50 am
by Dude
Bisonte wrote:only the filename of your executable is store(added), so nothing will modify other apps/programs.
Okay, thanks for the explanation. Good to know! :)