0

Unable to play video within web page


Sub Main()
msgPort = CreateObject("roMessagePort")
r = CreateObject("roRectangle", 0, 0, 1920, 1080)
  
config = {
url: "http://web-display.hypno.cam/gallery/fps_test",
' url: "http://www.google.com"
}
h = CreateObject("roHtmlWidget", r, config)
h.SetPort(msgPort)
h.SetHWZDefault("on")
h.EnableJavascript(true)
sleep(10000)
h.Show()
while true
    msg = wait(0, msgPort)
    print "type(msg)=";type(msg)
    if type(msg) = "roHtmlWidgetEvent" then
        eventData = msg.GetData()
        if type(eventData) = "roAssociativeArray" and type(eventData.reason) = "roString" then
            print "reason = ";eventData.reason
            if eventData.reason = "load-error" then
                print "message = ";eventData.message
            endif
        endif
    endif
end while
End Sub




Above is my brightscript, and below are some errors I see in my logs

[ 30.423] BSPLAY: http://web-display.hypno.cam/gallery/fps_test [ 31.809] Playing: https://s3.amazonaws.com/pro-media-prod-public/2J7JR5s3b0a0/2J7JR5s3b0a0_preview.mp4 [ 31.809] MediaStreamer::SetPipeline called with {gst:https://s3.amazonaws.com/pro-media-prod-public/2J7JR5s3b0a0/2J7JR5s3b0a0_preview.mp4} [ 31.810] TIME: PlayFile = 0.001241889s [ 31.894] Playing: https://s3.amazonaws.com/pro-media-prod-public/M87upEE3b0ac/M87upEE3b0ac_preview.mp4 [ 32.490] JS.Supervisor : INFO API GET request "/v1/health" [ 32.815] JS.Supervisor : INFO API response to "/v1/health" => {"status":"active","statusTime":"2023-02-02 14:53:52 EST"} [ 32.848] JS.Supervisor : INFO API GET request "/v1/health" [ 32.857] JS.Supervisor : INFO API response to "/v1/health" => {"status":"active","statusTime":"2023-02-02 14:53:53 EST"} [ 32.896] JS.Supervisor : INFO API GET request "/v1/files/" [ 32.908] "Sending responsePayload without storage info" [ 32.916] JS.Supervisor : INFO API response to "/v1/files/" => {"files":[{"name":"flash","type":"dir","path":"flash","stat":{"dev":24,"mode":16893,"nlink":2,"uid":0,"gid":1003,"rdev":0,"blksize":4096,"ino":1,"size":160,"blocks":0,"atimeMs":946684800000,"mtimeMs":946684800000,"ctimeMs":1675367612000,"birthtimeMs":16753... [truncated] [ 32.990] JS.Supervisor : INFO API GET request "/v1/control/local-dws" [ 32.997] JS.Supervisor : INFO API response to "/v1/control/local-dws" => {"success":true,"value":true} [ 32.999] JS.Supervisor : INFO API GET request "/v1/info" [ 33.054] JS.Supervisor : INFO API GET request "/v1/registry/recovery_url" [ 33.065] JS.Supervisor : INFO API response to "/v1/info" => {"serial":"D5E881002114","upTime":"Less than a minute","upTimeSeconds":32,"model":"XT244","FWVersion":"8.5.33","bootVersion":"7.1.53","family":"malibu","isPlayer":true,"bsnce":true,"power":{"result":{"battery":"absent","source":"AC","switch_mode":"hard"}},... [truncated] [ 33.068] JS.Supervisor : INFO API response to "/v1/registry/recovery_url" => {"success":true,"value":""} [ 33.089] JS.Supervisor : INFO API GET request "/v1/time" [ 33.099] JS.Supervisor : INFO API response to "/v1/time" => {"time":"2023-02-02 14:53:53 EST","timezone_name":"America/New_York","timezone_abbr":"EST","year":2023,"month":2,"date":2,"hour":14,"minute":53,"second":53,"millisecond":307} [ 33.105] JS.Supervisor : INFO API GET request "/v1/video-mode" [ 33.114] JS.Supervisor : INFO API response to "/v1/video-mode" => {"isAutoMode":false,"name":"1920x1080x30p","width":"1920","height":"1080","frames":"30","scan":"p","mode":{"colorDepth":"8bit","colorSpace":"rgb","dropFrame":false,"frequency":30,"graphicsPlaneHeight":1080,"graphicsPlaneWidth":1920,"height":1080,"interlace... [truncated] [ 33.123] JS.Supervisor : INFO API GET request "/v1/video-mode?configured=true" [ 33.131] JS.Supervisor : INFO API response to "/v1/video-mode?configured=true" => {"isAutoMode":false,"name":"1920x1080x30p","width":"1920","height":"1080","frames":"30","scan":"p","mode":{"colorDepth":"8bit","colorSpace":"rgb","dropFrame":false,"frequency":30,"graphicsPlaneHeight":1080,"graphicsPlaneWidth":1920,"height":1080,"interlace... [truncated] [ 41.813] Timed out waiting for no-more-pads [ 41.815] Gstreamer::Connect: aborted [ 41.815] FireEvent 16 MEDIAERROR (line 1130) 0x7e980237f0 [ 41.815] FireEvent 30 MEDIAERROR_NOTSTARTED (line 1131) 0x7e980237f0 [ 41.815] MediaStreamer::SetPipeline called with {gst:https://s3.amazonaws.com/pro-media-prod-public/M87upEE3b0ac/M87upEE3b0ac_preview.mp4} [ 41.815] TIME: PlayFile = 9.920762179s [ 41.815] BRIGHTSIGN_VIDEO_ERROR: Cannot play stream [ 41.816] BRIGHTSIGN_VIDEO_ERROR: Cannot start playback, media not found [ 41.824] [INFO] [source http://web-display.hypno.cam/assets/script.js:20011]: error loading hypno video [ 51.816] Timed out waiting for no-more-pads [ 51.817] Gstreamer::Connect: aborted [ 51.817] FireEvent 16 MEDIAERROR (line 1130) 0x7e9804e790 [ 51.817] FireEvent 30 MEDIAERROR_NOTSTARTED (line 1131) 0x7e9804e790 [ 51.817] BRIGHTSIGN_VIDEO_ERROR: Cannot play stream [ 51.817] BRIGHTSIGN_VIDEO_ERROR: Cannot start playback, media not found [ 51.824] [INFO] [source http://web-display.hypno.cam/assets/script.js:20011]: error loading hypno video [ 58.052] Autorun.status : INFO Status request not being sent, because registration didn't complete. [ 64.380] JS.Supervisor : INFO API GET request "/v1/logs" [ 64.637] JS.Supervisor : INFO API response to "/v1/logs" => "[ 0.000] Booting Linux on physical CPU 0x0\n[ 0.000] Linux version 4.9.135-1.14+bs8.5.33 (builder@brightsign) (gcc version 9.3.0 (GCC) ) #1 SMP Mon Dec 5 18:23:24 UTC 2022\n[ 0.000] Boot CPU: AArch64 Processor [420f1000]\n[ 0.000] Reserved mem... [truncated] [ 64.653] JS.Supervisor : INFO API GET request "/v1/logs/crash-dumps" [ 64.658] JS.Supervisor : INFO API response to "/v1/logs/crash-dumps" => [{"fileName":"crash-dump","ctime":"2023-02-02T19:12:13.000Z"}] [ 87.886] JS.Channel-BSN: ERROR checkWebSocketStability has failed. Attempting to restart websockets. 




The webpage renders video into a canvas element using webGL.  Not sure what I need to do to amend, please advise!

2 comments

  • 0
    Avatar
    Bright Scripters

    The javascript console is very useful in situations such as described

    https://brightsign.atlassian.net/wiki/spaces/DOC/pages/370672286/HTML+Best+Practices

  • 0
    Avatar
    Bobby Ortiz

    I have the same issue with the same errors. My webpage plays a video for a few hours, and then they stop and I see these errors in the logs. Did you ever find a solution? I also use animations on my pages. I am worried that resources are being lost, memory gets low, and then things just stop working. I am still researching, but that is how it appears. Have you any more details?

    More details...

    I have a node application running in the background. It hosts and serves my website with express. My node app does not record any errors or crashes, but at some point it can no longer write to the log. The player still communicates with BrightAuthor, but something is preventing most code from working.

    Once I get in this state, it appears the player is frozen.

Please sign in to leave a comment.