IMDB video in WebGadget

Just starting out? Need help? Post your questions and find answers here.
firace
Addict
Addict
Posts: 946
Joined: Wed Nov 09, 2011 8:58 am

IMDB video in WebGadget

Post 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 
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: IMDB video in WebGadget

Post 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?
Last edited by Dude on Sat Nov 03, 2018 11:48 am, edited 1 time in total.
User avatar
Bisonte
Addict
Addict
Posts: 1305
Joined: Tue Oct 09, 2007 2:15 am

Re: IMDB video in WebGadget

Post 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....
Last edited by Bisonte on Sat Nov 03, 2018 11:50 am, edited 1 time in total.
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: IMDB video in WebGadget

Post 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! :)
Post Reply