Line 17: | Line 17: | ||
{{ScriptFunction|bool|Networked|{ get;set; }|Should changes to this browser be streamed to other clients within the area?.|5=<pre>Space.Host.ExecutingObject.Browser.Networked=true</pre>}} | {{ScriptFunction|bool|Networked|{ get;set; }|Should changes to this browser be streamed to other clients within the area?.|5=<pre>Space.Host.ExecutingObject.Browser.Networked=true</pre>}} | ||
− | {{ScriptFunction|bool|Muted|{ get;set; }|Whether this Browser Surface is muted or not.|5=<pre>Space.Host.ExecutingObject.Browser.Muted=true</pre>}} | + | {{ScriptFunction|bool|Muted|{ get;set; }|Whether this Browser Surface is muted or not.|5=<pre>Space.Host.ExecutingObject.Browser.Muted=true</pre>|6=<pre>--the below scipt makes this object a clickable that mutes/unmutes a browser surface |
+ | --(Example: Browser Mute button ) | ||
+ | --[Required: This object's parent needs to be an object with BrowserSurface component in it] | ||
+ | |||
+ | thisGameObject = Space.Host.ExecutingObject | ||
+ | isMuted = 0 | ||
+ | |||
+ | |||
+ | OnClick = function() | ||
+ | |||
+ | if isMuted == 0 then | ||
+ | thisGameObject.Parent.Browser.Muted = true | ||
+ | isMuted = 1 | ||
+ | Space.Log("Browser muted") | ||
+ | elseif isMuted == 1 then | ||
+ | thisGameObject.Parent.Browser.Muted = false | ||
+ | isMuted = 0 | ||
+ | Space.Log("Browser unmuted") | ||
+ | end | ||
+ | |||
+ | end | ||
+ | |||
+ | thisGameObject.AddClickable() | ||
+ | thisGameObject.Clickable.Tooltip = "Click to Mute/Unmute Browser" | ||
+ | thisGameObject.Clickable.OnClick(OnClick) </pre>}} | ||
{{ScriptFunction|bool|CanGoBack|{ get; }|Returns whether this Browser Surface can navigate back|5=<pre>CanGoBack = Space.Host.ExecutingObject.Browser.CanGoBack</pre>}} | {{ScriptFunction|bool|CanGoBack|{ get; }|Returns whether this Browser Surface can navigate back|5=<pre>CanGoBack = Space.Host.ExecutingObject.Browser.CanGoBack</pre>}} |
Equivalent to hitting the 'back' button within the browser.
Space.Host.ExecutingObject.Browser.Back()
Calls a JS function in the browser with a single argument. The function name must begin with the characters "sinespace__".
Equivalent to hitting the 'forward' button within the browser.
Space.Host.ExecutingObject.Browser.Forward()
Registers a JS function in the browser. The function name must start with the characters "sinespace__".
Refreshes and reloads the current webpage.
Space.Host.ExecutingObject.Browser.Reload()
Sets the URL for the browser frame, and navigates to it. (A standard URL recognized by Chromium; e.g. (https://www.youtube.com)
Space.Host.ExecutingObject.Browser.SetURL('https://www.youtube.com')
Should changes to this browser be streamed to other clients within the area?.
Space.Host.ExecutingObject.Browser.Networked=true
Whether this Browser Surface is muted or not.
Space.Host.ExecutingObject.Browser.Muted=true
--the below scipt makes this object a clickable that mutes/unmutes a browser surface --(Example: Browser Mute button ) --[Required: This object's parent needs to be an object with BrowserSurface component in it] thisGameObject = Space.Host.ExecutingObject isMuted = 0 OnClick = function() if isMuted == 0 then thisGameObject.Parent.Browser.Muted = true isMuted = 1 Space.Log("Browser muted") elseif isMuted == 1 then thisGameObject.Parent.Browser.Muted = false isMuted = 0 Space.Log("Browser unmuted") end end thisGameObject.AddClickable() thisGameObject.Clickable.Tooltip = "Click to Mute/Unmute Browser" thisGameObject.Clickable.OnClick(OnClick)
Returns whether this Browser Surface can navigate back
CanGoBack = Space.Host.ExecutingObject.Browser.CanGoBack
Returns whether this Browser Surface can navigate forward
CanGoForward = Space.Host.ExecutingObject.Browser.CanGoForward
|