I'm not sure if this is my problem or not, but I made a webpage that would kinda act as a browser..
[url]http://blackopslounge.com/browser/[/url]
It uses an iframe and it's not letting me type in any text box that's inside of the iframe. I can select it, but it doesn't lock the player up like it normally would to allow typing.
Is this something on my end or something on the modules end?
Iframes don't work well.
Multiplayer seems a bit tricky, how did you manage to get it work on GMod Tower, and the videos on-sync for every player?
Ah, so they aren't in-sync at all, and everyone has their own browser. I'm working on to make it synced, but for in-sync scrolling I'd need a new function.
A function that allows me to get the current scroll of the scrollbar. Could this be implemented?
Nevermind, I might be able to get around it.
How to use it @_@?
[QUOTE=Amic;16240838]How to use it @_@?[/QUOTE]
Learn Lua and watch the examples.
I downloaded the example browser_base and chrome entities (because I can't be fucked to do something on my own), and the browser part comes behind the TV screen on the chrome entity, and browser_base seems to do nothing when spawned with ULX ent.
How do I fix the chrome entity?
Make sure you downloaded the materials with browser_base, and you need to modify the GetBrowserPos (or something similiar) function to reposition the browser.
Or download my example. I pretty much did that for.
This is what I get with blackops example.
[url]http://i25.tinypic.com/2m4wt3s.jpg[/url]
[QUOTE=Jake1305;16285469]This is what I get with blackops example.
[url]http://i25.tinypic.com/2m4wt3s.jpg[/url][/QUOTE]
hm, i have same problem
] ent_create google
Requesting browser 32 32 / 32 32
Had to make new browser
Attaching regen to texture "error"
Stack Error: 1 values left on Stack!
0> Type: number - Value: '-1'
my awesomium dll at *username*\garrysmod and gm_chrome at lua\includes\modules, what's wrong with this?
[QUOTE=Megalan;16285677]Attaching regen to texture "error"[/QUOTE]
You need a procedural texture to attach to. Like the two I provided in the example folder.
Is the module needed to be on the client on multiplayer aswell as the server?
-snip-
Not on the server, as this is clientside.
Snippity do dah
[QUOTE=raBBish;15867282]I've only got it working clientside, streaming a mp3 from my website, but for some reason it stops after 10-20 seconds. No luck serverside yet.
Some stuff I found out by reading the sources:
[lua]
require "bass"
--Finds the sound file from garrysmod/sound
local bassTest = BASS.StreamFile( "some/sound.wav" )
if bassTest then bassTest:play() end
local function bassCall( handle, someNum )
if not handle then return end
handle:play()
end
BASS.StreamFileURL( "http://randomsite.com/audio.mp3", 0 bassCall )
[/lua]
List of functions:
[list]
[*]BASS.StreamFile( string path ) --Returns BASS channel on success, false on fail
[*]BASS.StreamFileURL( string path, int, function callback ) --Can't remember what it returns
[*]BASS.SetPosition( vec Pos, vec Vel, vec Front, vec Up ) --Sets 3D position in world
[*]BASS.p_PendingChannels --No idea what this is
[/list]
List of metafunctions for BASS channels:
[list]
[*]play()
[*]pause()
[*]stop()
[*]getlength()
[*]getposition()
[*]gettag( string Format ) --Returns formated tags [url]http://gmodmodules.googlecode.com/svn/trunk/gm_bass/bass/tags-readme.txt[/url]
[*]getplaying()
[*]getlevel()
[*]setposition( number noIdeaWhat )
[*]setvolume( float volume )
[*]fft2048() --No idea
[*]set3dposition( vec Pos, vec Orientation, vec Velocity)
[*]getrawtag( int )
[/list]
I hope this helps someone.
[b]ON-TOPIC:[/b] I can't wait for the new version of gm_chrome :haw:[/QUOTE]
This is off-topic I know but since Garry removed the voice_inputfromfile convar, I got interested in gm_bass. The reason your sound stops playing is because the handle is being garbage collected, I believe. You're using a local variable, so as soon as it goes out of scope, the garbage collector is free to remove it. You have to keep a reference to it.
Azu, these are seriously badass modules you're pumping out, loving every one of them.
also
[lua]
function ENT:OpeningURL(url)
self:ForcePlaySelect()
print("opening", url)
return --THIS LINE
end --this too
self:RemoveBrowser()
self.DrawTranslucent = self.MessageDraw
end
[/lua]
[url]http://code.google.com/p/gmodmodules/source/browse/trunk/gm_chrome/example/entities/gmt_radio/cl_init.lua[/url]
I don't think those should be there
[QUOTE=blackops7799;16281493]Or download my example. I pretty much did that for.[/QUOTE]
I see everything so shiny in your example.
EDIT: It fixed without doing nothing...
-snip-
Slap it on a Plasma TV as a VGUI? Serverside?? How would this be done?
I stripped out almost all of GMT's stuff in the radio :v:
The only part I can't figure out now, is which function starts the streaming... it looks like there's 3 different points it could start from... StartRadio, ChannelChanged, or this line that says "hook.Add("Location", "PlayerLeaveRoomRadio", function(ply, location)"
[editline]08:02PM[/editline]
I keep accidently gmod
[editline]08:04PM[/editline]
Also, trying to open an mp3 directly, opens this message box which says something like 'didRecieve'.
I'm guessing that's what the 'self:ForcePlaySelect() ' prevented
[editline]08:05PM[/editline]
which prevents gmod from crashing
It would be possible to add hooks with it? For example OnLoad, OnChange, OnFocus, etc...
and it would be possible to augment the size of resolution?
don't know what you mean but it's not that hook... so now I just have 2... but I can't make a working ENT:CalculateEarShot() with find in sphere stuff. it self:GetPos() isn't working :/
[editline]09:56PM[/editline]
Screwing with values should fix it :/
[editline]10:07PM[/editline]
attempt to call method 'GetPos' (a nil value)
from
self.radiostream:set3dposition(self:GetPos(), zerovec, zerovec)
:/ self is nothing.
[QUOTE=Costest;16340482]don't know what you mean but it's not that hook... so now I just have 2... but I can't make a working ENT:CalculateEarShot() with find in sphere stuff. it self:GetPos() isn't working :/
[editline]09:56PM[/editline]
Screwing with values should fix it :/[/QUOTE]
I mean to execute a function when web ends loading, when you change the web, etc.. I did a console command to choose which web page I want, but I want to do a "come back" console command too.
[media]http://www.youtube.com/watch?v=AlfJG5sBYeI[/media]
I made a little demonstration so people could see. I gave credit to Blackops since I used his little entity, as well as Azu in the description.
[lua]
function ENT:FinishLoading()
print("I'm done loading")
end
[/lua]
?
[editline]10:15PM[/editline]
that's a pretty cool video in the video, but the quality is bad.
try using wegame recorder
[editline]10:16PM[/editline]
I got streaming music working :D
Runnin' in the 90's.. yeah we're runnin' in the 90's
:P I picked that to test it out
Edit: But it's just not as awesome as GMT's radio
[QUOTE=Costest;16340752]that's a pretty cool video in the video, but the quality is bad.
try using wegame recorder[/QUOTE]
I had to use Fraps, because in the demo it merely shows the texture as unchanging, since, well, the Lua/binary isn't running, so Source Recorder was out
And then, well, DivX codec refused to compress it since it was in a non-raw codec. I still have the old footage, so I could recompress it later with a less-crappy codec, but I'm too lazy at the moment. :v:
[editline]9:35PM[/editline]
It also might be because my gmod settings weren't on max at the time. I'm running on a laptop, since my desktop has gotten a lot more out-of-date than my laptop (it's a new machine), so I'm on it for now. The only problem is it overheats a lot on max settings.