This file contains 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
//reset these with every player load/playback session | |
var PLAY_REACHED_25_PERCENT = false; | |
var PLAY_REACHED_50_PERCENT = false; | |
var PLAY_REACHED_75_PERCENT = false; | |
var PLAY_REACHED_100_PERCENT = false; | |
kalturaPlayer.addEventListener(kalturaPlayer.Event.Core.TIME_UPDATE, function (event) { | |
var progpercent = kalturaPlayer.currentTime / kalturaPlayer.duration; | |
if (!PLAY_REACHED_25_PERCENT && progpercent >= 0.25) { | |
PLAY_REACHED_25_PERCENT = true; |
This file contains 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
<?php | |
//This goes on your backend - never include API secret keys in front end code | |
$expire=60*60*24; //one day | |
$uniqueUserId = 'someUniqueUserId'; //Make sure this is set to your real user IDs so that Analytics and Entitlements will really be tracked according to your business needs | |
$partnerId = REPLACE_ME; //https://kmc.kaltura.com/index.php/kmcng/settings/integrationSettings | |
$apiAdminSecret = 'REPLACE_ME'; //https://kmc.kaltura.com/index.php/kmcng/settings/integrationSettings | |
$uiconfId = REPLACE_ME; //https://kmc.kaltura.com/index.php/kmcng/studio/v3 | |
$entryId = 'REPLACE_ME'; //https://kmc.kaltura.com/index.php/kmcng/content/entries/list | |
$appName = 'MyAppName'; //used to designate your application name, this can be used in the Analytics later to differentiate usage across different apps (such as website vs. mobile iOS vs. mobile Android vs. partner site) | |
$appDomain = 'my.appdomain.com'; // the domain to track this playback session to |
This file contains 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
<?php | |
//This PHP part of the code goes on your backend - never include API secret keys in front end code | |
$partnerId = REPLACEME; //https://kmc.kaltura.com/index.php/kmcng/settings/integrationSettings | |
$apiAdminSecret = 'REPLACEME'; //https://kmc.kaltura.com/index.php/kmcng/settings/integrationSettings (Admin Secret) | |
$expire=60*60*24; //one day | |
$uniqueUserId = 'someUniqueUserId'; //Make sure this is set to your real user IDs so that Analytics and Entitlements will really be tracked according to your business needs | |
$uiconfId = REPLACEME; //https://kmc.kaltura.com/index.php/kmcng/studio/v3 | |
$appName = 'expressrecorder'; //used to designate your application name, this can be used in the Analytics later to differentiate usage across different apps (such as website vs. mobile iOS vs. mobile Android vs. partner site) | |
$appDomain = 'my.appdomain.com'; // the domain to track this playback session to | |
//generate the Kaltura Session for secure and tracked playback session |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
* { | |
box-sizing: border-box; | |
} |
This file contains 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
from KalturaClient import * | |
config = KalturaConfiguration(<PARTNER ID>) | |
client = KalturaClient(config) | |
ks = client.session.start( | |
<ADMIN SECRET>, | |
<YOUR EMAIL ADDRESS>, | |
KalturaSessionType.ADMIN, | |
<PARTNER ID> | |
) |
This file contains 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
client.setKs(ks) |
This file contains 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
entry = KalturaMediaEntry() | |
entry.mediaType = KalturaMediaType.VIDEO | |
entry.name = "Sample Video" | |
entry.description = "yet another sample video in my arsenal" | |
mediaEntry = client.media.add(entry) |
This file contains 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
uploadToken = KalturaUploadToken() | |
result = client.uploadToken.add(uploadToken) | |
tokenId = result.id |
This file contains 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
uploadToken = KalturaUploadToken() | |
result = client.uploadToken.add(uploadToken) | |
tokenId = result.id |
This file contains 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
fileData = open('IMG_9227.m4v', 'r') | |
result = client.uploadToken.upload(tokenId, fileData) |