Last active
October 11, 2018 01:14
-
-
Save sighmon/b5fda5435f1382cb7db2a72e7f103135 to your computer and use it in GitHub Desktop.
BrightSign cache test with remote debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Main() | |
msgPort = CreateObject("roMessagePort") | |
r = CreateObject("roRectangle", 0, 0, 1920, 1080) | |
is = { | |
port: 3000 | |
} | |
config = { | |
inspector_server: is | |
brightsign_js_objects_enabled: true | |
url: "https://s3.ap-southeast-2.amazonaws.com/museumos-dev-media/simon-test/brightsign/index.html" | |
} | |
html = CreateObject("roHtmlWidget", r, config) | |
html.SetPort(msgPort) | |
html.SetAppCacheDir("SD:/") | |
html.SetAppCacheSize(2147450880) | |
sleep(10000) | |
html.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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html manifest="manifest.appcache"> | |
<head> | |
<style> | |
body { | |
background-color: #000; | |
color: #FFF; | |
} | |
</style> | |
</head> | |
<body> | |
<video width="100%" height="100%" autoplay loop x-bs-stream-latency="2000"> | |
<source src="https://s3.ap-southeast-2.amazonaws.com/museumos-dev-media/simon-test/brightsign/bbb_sunflower_1080p_30fps_normal.mp4" type="video/mp4"> | |
Your browser does not support the video tag. | |
</video> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CACHE MANIFEST | |
# v1 - 2018-10-08 | |
# Testing caching a remote video | |
CACHE: | |
https://s3.ap-southeast-2.amazonaws.com/museumos-dev-media/simon-test/brightsign/index.html | |
https://s3.ap-southeast-2.amazonaws.com/museumos-dev-media/simon-test/brightsign/bbb_sunflower_1080p_30fps_normal.mp4 | |
NETWORK: | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment