Downloads Integration Details
Allow your website visitors to securely download movies from your website to the Secure Player app
1. PUT YOUR MOVIE FILE URL IN JSON
ENCODE THE JSON
3. PUT A DOWNLOAD BUTTON ON YOUR SITE
<button onclick="window.location='splayer://dl?b= eyJ1cmxtb3ZpZSI6ICJodHRwczovL2V4YW1wbGUuY29tL2Rvd25sb2FkP21vdmllPWJlYW5zLm1wNCJ9'">DL</button>
When user taps on the DL button, the Secure Player app will open and start to download the file from the URL that you specified in the first step. It will look something like this.
Check out some actual sample downloads on the Sample Videos page.
Using VR downloads
To specify VR playback of a movie file, add the "viewmode"
parameter to the JSON in step 1 of the minimum implementation. Then continue with step 2 and step 3.
"urlmovie": " "viewmode" : "TD"
Stereoscopic, top down
Side by side, 180 degrees
Side by side, 360 degrees
Use Metadata API (Optional)
To show custom metadata like title and cover picture, implement and use the metadata API
You need to host the metadata API on your own server.
1. ADD THE URL OF YOUR METADATA API TO THE JSON:
"urlmovie": "examplemovie123", "metadata_api": "examplemovie123"
2. THE METADATA API SHOULD RETURN JSON LIKE THIS:
"title": "Big Buck BUNNY",
All of the properties in the metadata response are optional.
"title" will be shown instead of the movie filename.
"urlpicture" - which should point to an image file - will be shown as the cover image instead of the default cover.
If your movie has several parts you can use "part" to specify the part number.
"filesize" should be the number of bytes of the movie - if specified this will allow the app to show move file size before download begins.
Refer to the example screenshot.
Use Authentication API (Optional)
If you want to authenticate the user before download and playback, implement and use the authentication API.
You need to host the authentication API on your own server.
Add the "auth_api" property to the JSON specified in "Minimum implementation". The URL should point to the authentication API.
The authentication API should return one of three responses in JSON format:
If authentication is required. App will open the redirect target login page in a web view.
If access is granted. Should confirm the session cookies.
"message": "Some random error."
If error occurred. The error title and message will be shown in an alert.
© 2019 secureplayer.net