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
const analyticsConfig = { | |
key: '<ANALYTICS-KEY>', | |
videoId: 'video-empty', | |
userId: 'xxx_01', | |
cdnProvider: 'some_cdn', | |
customData1: 'sport', | |
title: 'video title set without a source, yet', | |
debug: true | |
}; |
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
document.getElementById('change-source').onclick = function () { | |
analytics.sourceChange({ | |
title: 'someVideoTitle', | |
videoId: 'video-1234' | |
}); | |
player.src({ | |
src: 'https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8', | |
type: 'application/x-mpegURL' | |
}); | |
}; |
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
''' | |
chunked_server_test.py | |
Copyright August 3, 2012 | |
Released into the public domain | |
This implements a chunked server using Python threads and the built-in | |
BaseHTTPServer module. Enable gzip compression at your own peril - web | |
browsers seem to have issues, though wget, curl, Python's urllib2, my own | |
async_http library, and other command-line tools have no problems. |
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
// https://github.com/bitmovin/bitmovin-player-android-samples/blob/master/BasicAds/src/main/java/com/bitmovin/player/samples/ads/basic/MainActivity.java | |
... | |
import com.bitmovin.player.config.advertising.AdItem; | |
import com.bitmovin.player.config.advertising.AdSource; | |
import com.bitmovin.player.config.advertising.AdSourceType; | |
import com.bitmovin.player.config.advertising.AdvertisingConfiguration; | |
... |
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
//get this key directly from the AndroidManifest.xml | |
String playerKey= this.gePlayerLicenseKey(); | |
//Step 1: Create your analytics config object | |
BitmovinAnalyticsConfig bitmovinAnalyticsConfig = new BitmovinAnalyticsConfig("<ANALYTICS_KEY>", playerKey, getApplicationContext()); | |
//Step 2: Add optional parameters -> https://gist.github.com/michael-riha/85c5d9629dfc38be9d4c5ad9aaf02a4f | |
//Step 3: Create Analytics Collector -> https://gist.github.com/michael-riha/85c5d9629dfc38be9d4c5ad9aaf02a4f | |
... | |
//Step 4: Attach BitmovinPlayer final step |
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
protected String gePlayerLicenseKey() { | |
// https://blog.iangclifton.com/2010/10/08/using-meta-data-in-an-androidmanifest/ | |
try { | |
ApplicationInfo ai = getPackageManager().getApplicationInfo(this.getPackageName(), PackageManager.GET_META_DATA); | |
Bundle bundle = ai.metaData; | |
String playerApiKey = bundle.getString("BITMOVIN_PLAYER_LICENSE_KEY"); | |
return playerApiKey; | |
} catch (PackageManager.NameNotFoundException e) { | |
Log.e(TAG, "Failed to load meta-data, NameNotFound: " + e.getMessage()); | |
} catch (NullPointerException e) { |
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
... | |
import com.bitmovin.analytics.BitmovinAnalyticsConfig; | |
import com.bitmovin.analytics.bitmovin.player.BitmovinPlayerCollector; | |
import com.bitmovin.analytics.enums.CDNProvider; | |
... | |
//Step 1: Create your analytics config object | |
BitmovinAnalyticsConfig bitmovinAnalyticsConfig = new BitmovinAnalyticsConfig("<ANALYTICS_KEY>", "<PLAYER_KEY>", getApplicationContext()); |
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
// paste this inside: https://github.com/bitmovin/bitmovin-player-android-samples/blob/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/java/com/bitmovin/samples/tv/playback/basic/MainActivity.java#L69 | |
// Do this to get a good startup quality. try to start with a rendition around 12Mbit in this case | |
playerConfiguration.getAdaptationConfiguration().setStartupBitrate(12_000_000); |
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
// https://github.com/bitmovin/bitmovin-player-android-samples/blob/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/java/com/bitmovin/samples/tv/playback/basic/MainActivity.java#L177 | |
this.bitmovinPlayer.play(); | |
// https://github.com/bitmovin/bitmovin-player-android-samples/blob/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/java/com/bitmovin/samples/tv/playback/basic/MainActivity.java#L173 | |
this.bitmovinPlayer.pause(); | |
// https://github.com/bitmovin/bitmovin-player-android-samples/blob/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/java/com/bitmovin/samples/tv/playback/basic/MainActivity.java#L181-L185 | |
private void stopPlayback() | |
{ | |
this.bitmovinPlayer.pause(); |
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
//https://github.com/bitmovin/bitmovin-player-android-samples/blob/5f0719f954e4ce8faee1bb290bed715a7ae1b935/BasicPlaybackTV/src/main/java/com/bitmovin/samples/tv/playback/basic/MainActivity.java#L134-L167 | |
private boolean handleUserInput(int keycode) | |
{ | |
Log.d(TAG, "Keycode " + keycode); | |
switch (keycode) | |
{ | |
case KeyEvent.KEYCODE_DPAD_CENTER: | |
case KeyEvent.KEYCODE_ENTER: | |
case KeyEvent.KEYCODE_NUMPAD_ENTER: | |
case KeyEvent.KEYCODE_SPACE: |
NewerOlder