Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function get_header($data, $preview)
- {
- $header = array(
- "title" => "This Is A Title",
- "css" => array("style.css"),
- "js" => array(),
- "html" => "",
- );
- return $header;
- }
- function get_body($data, $preview, $subtitle, $links)
- {
- if ($subtitle) {
- $subtitle = '
- tracks: [{
- file: "' . $subtitle . '",
- label: "English",
- kind: "captions",
- "default": true
- }],
- captions: {
- fontFamily: "' . $data->get("family") . '",
- fontSize: ' . $data->get("font") . ',
- color: "' . $data->get("color") . '",
- backgroundOpacity: 0
- },';
- }
- $html = '
- <div id="player"></div>
- <script type="text/javascript">
- ';
- $script = '
- var player = jwplayer("player");
- player.setup(
- {
- width: "' . $data->get("width") . '",
- height: "' . $data->get("height") . '",
- skin: "seven",
- preload: "' . $data->get("preload") . '",
- controls: ' . $data->get("controls") . ',
- displaytitle: false,
- flashplayer: "' . $data->get("url") . '/player/jwplayer/assets/jwplayer.flash.swf",
- aspectratio: "' . $data->get("aspect") . '",
- fullscreen: "' . $data->get("fullscreen") . '",
- primary: "html5",
- provider: "http",
- autostart: false,
- image: "' . $preview . '",
- sources: ' . json_encode($links) . ',
- type: "video/mp4",
- logo:
- {
- file: "' . $data->get("logo") . '",
- link: "' . $data->get("logo_link") . '",
- },' . $subtitle . '
- abouttext: "' . $data->get("about") . '",
- aboutlink: "' . $data->get("about_link") . '"
- });
- ';
- $packer = new JavaScriptPacker($script, 'Normal', true, false);
- $packed = $packer->pack();
- $html .= $packed;
- $html .= '
- </script>
- ';
- return $html;
- }
- function get_footer($data)
- {
- $html = null;
- return $html;
- }
- $db->query("UPDATE files SET views=views+1 WHERE slug='{$var->get->id}'");
Add Comment
Please, Sign In to add comment