-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathplayer.php
33 lines (26 loc) · 863 Bytes
/
player.php
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
<?php
require('init.inc.php');
$transcode_args = array();
foreach($_POST as $key=>$value){
if(!empty($value) && $key != 'preset' && $key != 'bitrate'){
$transcode_args[] = $key.':'.$value;
}
}
$transcode_url = BASE_URL."/stream.php/".implode(';', $transcode_args);
$transcode_url .= '/'.basename($mediafile);
if($_POST['container']=='ogg' && $mediatype == 'video')
$transcode_url .= '.ogv';
else
$transcode_url .= '.'.$_POST['container'];
$smarty->assign('player', $_POST['player']);
$smarty->assign('transcode_url', $transcode_url);
if(!empty($_POST['size'])){
$size = explode('x', $_POST['size']);
$smarty->assign('width', $size[0]);
$smarty->assign('height', $size[1]);
}
else{
$smarty->assign('width', $mediainfo->width);
$smarty->assign('height', $mediainfo->height);
}
$smarty->display('player.tpl.html');