bitmovin / bitmovin-player-ui

The Bitmovin Adaptive Streaming Player UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: bitmovin.player.Player is not a constructor

rnmhdn opened this issue · comments

I copy the exact code from here and run python -m http.server and then I get that error. I didn't input a license yet but It was mentioned that the domain localhost is whitelisted.

We just recognized that in the complete template an outdated link is used to include the player.

Please use:

<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8.0.0/bitmovinplayer.js"></script>

This is not related to the UI so I'm closing this issue. For player support please write to support@bitmovin.com.

I changed that to version 8 and it worked. however when I do:
wget "https://cdn.bitmovin.com/player/web/8.0.0/bitmovinplayer.js"
and change the link in my file to:
<script type="text/javascript" src="bitmovinplayer.js"></script>
I get the following errors:

Loading failed for the <script> with source “http://localhost:8000/bitmovinplayer-ui.js”. copy.html:1:1
Could not load UI 
error { target: script
, isTrusted: true, srcElement: script, eventPhase: 0, bubbles: false, cancelable: false, defaultPrevented: false, composed: false, timeStamp: 514, cancelBubble: false, … }

That's because you just downloaded the player without the UI.

Check out the README for more information on how to build the UI.

Alternately you could use the UI from https://cdn.bitmovin.com/player/web/8.0.0/bitmovinplayer-ui.js and https://cdn.bitmovin.com/player/web/8.0.0/bitmovinplayer-ui.css. Don't forget to include the JS and CSS file.

I'm confused how changing only the line:
<script type="text/javascript" src="bitmovinplayer.js"></script>
affects that other js and css file. I thought the change I made only affected how the player was loaded.

Anyway, I did what you said and it worked. I have a small question now. the users can simply remove the watermark with the developer tools of the browser and do a screen capture. is there any way to prevent the user from removing the watermark or preventing the user from doing an screen capture?

also I can't find our how I can use clreakey drm. e.g. How I can play a video that I've created like this:
mp4-dash.py --encryption-key=121a0fca0f1b475b8910297fa8e0a07e:a0a1a2a3a4a5a6a7a8a9aaabacadaeaf Mp4/auto.mp4 --no-split --use-segment-list -o auto_no-split_enc
mp4-dash.py is from the Bento4 package.

Per default, the player tries to load the UI files from the same location as the player was served. Those can be changed by config.location.

I'm not sure what you mean by watermark. If you mean the logo in the top right of the UI, this can easily be removed. If you want an actual watermark, you would have to add this on the encoding side directly into the video data.

DRM is clearly not an UI topic so please contact support@bitmovin.com for further help.