Difference between revisions of "Tips & Tricks"
Line 52: | Line 52: | ||
== External HTML5 Games/Apps == | == External HTML5 Games/Apps == | ||
− | It is possible to open external HTML5 games or apps with the <code>link:{URL}</code> action. In most cases, however, you will not be able to return to the Media Station X application due to the lack of | + | It is possible to open external HTML5 games or apps with the <code>link:{URL}</code> action. In most cases, however, you will not be able to return to the Media Station X application due to the lack of a return function. The only way out in this case is to exit and restart the entire application. |
If you would like to open your own HTML5 game or app from the Media Station X application, you should also include a quit button to give users the chance to return to the Media Station X application. For example, this can be done by using the following JavaScript function. | If you would like to open your own HTML5 game or app from the Media Station X application, you should also include a quit button to give users the chance to return to the Media Station X application. For example, this can be done by using the following JavaScript function. |
Revision as of 15:50, 26 January 2021
Web Version Loader[edit]
If you have an older version of Media Station X, you can use the web version loader service to load the latest version from the web. Additionally, this service allows you to load the entire Media Station X application in a secure context (i.e. via https://
) to be able to use services like Twitch MSX.
Enter the start parameter web.msx.benzac.de
to set it up.
For more information about the Twitch MSX service, please visit: https://msx.benzac.de/info/?tab=Showcases§ion=Showcase7.
Screenshot[edit]
Google Drive MSX[edit]
Please note that the Google Drive API currently does not support a proper way of streaming content. Therefore, the content must be downloaded into the memory. Some TV devices have problems with this (especially if the content file is too large) and will abort the process. There are two ways to fix this problem.
- If the video/audio file is smaller than 100 MB, share the file (or the containing folder) publicly and let the file (or folder) name start with "export" (e.g. "export", "export.mp4", "export_My_Video.mp4", etc.). This will cause the Google Drive MSX service to open the file via the export link.
- You can use the OneDrive MSX or Dropbox MSX service for video/audio files, because these services have functions for streaming content.
For more information about the Google Drive MSX, OneDrive MSX, and Dropbox MSX service, please visit: https://msx.benzac.de/info/?tab=Showcases§ion=Showcase2.
Screenshot[edit]
Node Browser MSX[edit]
It is possible to use the Node Browser MSX service with other HTTP servers (instead of Node.js). To do so, you simply have to enable the directory listing function and CORS on the used server. For example, by using the following .htaccess
file.
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "Origin, Content-Type, Accept"
Header set Access-Control-Allow-Methods "GET, OPTIONS"
Options +Indexes
If the actual browser folder should not be the root folder, you can initiate a redirect in the loaded index file with the help of an HTML meta
tag. Please see this example code of a redirected browser folder.
<!DOCTYPE html>
<html>
<head>
<title>Node Browser Test</title>
<meta charset="UTF-8"/>
<meta name="node-browser-folder" content="path/to/folder"/>
</head>
<body>
<h1>Node Browser Test</h1>
</body>
</html>
Note: Please note that the CORS HTTP headers must also be present for the loaded index file.
For more information about the Node Browser MSX service, please visit: https://msx.benzac.de/info/?tab=Showcases§ion=Showcase5.
External HTML5 Games/Apps[edit]
It is possible to open external HTML5 games or apps with the link:{URL}
action. In most cases, however, you will not be able to return to the Media Station X application due to the lack of a return function. The only way out in this case is to exit and restart the entire application.
If you would like to open your own HTML5 game or app from the Media Station X application, you should also include a quit button to give users the chance to return to the Media Station X application. For example, this can be done by using the following JavaScript function.
function exitToApp() {
window.history.go(1 - window.history.length);
}