Step1. Accessing the web server
Let’s start off by testing write access to the web server. Create a text file and name it "player.html". In this text file put the following html:
1 2 3 4 5 6 7 8 9
<!DOCTYPE html> <html> <head> <title>upLynk Video Embed</title> </head> <body> <h1>Hello, World!</h1> </body> </html>
Save this file and upload it to your web server’s document root directory. Refer to the documentation for your web server software for this directory’s location.
Step 2. Test in the browser
With a web browser, view the player.html page you just created. You should see a header that says “Hello, World!”.
Step 3. Embed the upLynk Player using uplynk.js
Modify player.html to the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Refresh or reopen player.html in your browser. Playback of “Big Buck Bunny” should begin.
Step 4. Play your own content
By default, upLynk’s Digital Rights Management (DRM) prevents content from being played without a authorization token. Other tutorials walk you through the process of creating and using these tokens.
The example video's DRM has been disabled so that no authorization token is required. This is obviously not secure, but is sometimes useful during the development phase of a project - it lets you focus on getting playback working without worrying about the details of DRM just yet.
You can also mark an asset from your own content library to allow uncontrolled playback, so that during development you can test playback using your own content. Again, you should avoid using this in a production environment since an asset marked in this way could be played by anyone, but during development it can be helpful.
To disable DRM for an asset in your library:
- Log in to the upLynk CMS at http://cms.uplynk.com and select an asset.
- Click the Advanced tab in the Editor pane.
- Under DRM, uncheck "Require a token for playback" and click .
- Now go to the Details tab and copy the Playback URL.
Next, update player.html with the playback URL of your asset.
- Search towards the bottom of the code for the <script …> tag.
- Replace the playback url with your asset’s playback URL.
1 2 3 4 5
- Save player.html and load it in your browser. Your content should begin playing.
You’ve embedded the upLynk Player, using uplynk.js, in a web page served from your own web server. In the next tutorial, we'll re-enable DRM on the asset and cover secure playback.Back to tutorials