Hi guys,
I'm working on a new gamemode. And, basically, as I'm going to have a lot of different musics played during a game, and I don't want the player to download 1 terabyte of content, stream my music from soundcloud.
However a lot (really, a lot) of music are protected and cannot be streamed / downloaded which makes it impossible to use sound.PlayURL (...).
Having seen this feature in the gamemode 'Slave Of Gmod' I wondered how he'd done to avoid this problem to inspire me. His method is to put the audio player on a hidden PANEL then execute a javascript command to start the music.
However ... At the moment I cannot even display the player on a panel can you help me?
[CODE]
local frame = vgui.Create( "DFrame" )
frame:SetSize( 900, 900 )
frame:SetTitle( "My Super Player :D" )
frame:SetVisible( true )
frame:SetDraggable( true )
frame:Center()
--Fill the form with a html page
local html = vgui.Create( "DHTML" , frame )
html:Dock( FILL )
html:SetHTML([[
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/299209439&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>
]])
frame:MakePopup()
[/CODE]
I have this error :
[CODE][HTML] https://w.soundcloud.com/player/widget-0318292b.js:5: Uncaught TypeError: Cannot read property '0' of null
[/CODE]
And display this:
[T]https://puu.sh/uK9Uw/548e82cb70.jpg[/T]
(It works perfectly if I open it from a regular navigator)
Thanks !
Sorry, you need to Log In to post a reply to this thread.