具有相同编辑的jwplayer



im 使用 jwplayer 作为我的脚本来获取 youtube 视频

我需要对我的网站进行相同的编辑,以使播放器正常工作

YouTube中的相同视频有提示,因此,如果我将其添加到我的网站,它会显示没有关闭按钮的提示

如何禁用来自 YouTube 的提示以阻止它

提示示例

其他请求我如何从YouTube制作视频预览,例如JWPLAYER中的YouTube播放器

以及如何显示相关文件(它适用于旧的 JWPLAYER,但新的 JWPLAYER 需要相同的编辑才能进行相关工作)

我的SCTIPT是Onaracde

这是旧的相关.php

<?php
/**
 * onArcade 2.2.3
 * Copyright © 2006-2009 Hans , All Rights Reserved
 **
 * ONARCADE IS NOT FREE SOFTWARE!
 * http://www.onarcade.com
 **/
session_start();
define('PAGE', 'related');
require ('includes/config.php');
header ('Content-type: text/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>
<videolist>
<title>مشابهه فيديوهات:</title>';
    $file_id = (int) $_GET['f']; // get file id
    // Get file information from database... this is one big and ugly query
    $file_sql = "
        SELECT
            file.*,
            cat.name AS category_name, cat.permissions, cat.status AS category_status";
    if ($settings['added_by'] == 1)
        $file_sql .= ", ad.username AS adder_username";
    $file_sql .= "
        FROM
            ". $tbl_prefix ."files AS file
            LEFT JOIN ". $tbl_prefix ."categories AS cat ON (cat.catid = file.category)";
    if ($settings['added_by'] == 1)
        $file_sql .= " LEFT JOIN ". $tbl_prefix ."users AS ad ON (ad.userid = file.added_by)";
    $file_sql .= "
        WHERE file.fileid = ". $file_id ." && file.status = '1'
        LIMIT 1";
    $file_query = mysql_query($file_sql); // run query
    $file_row = mysql_fetch_assoc($file_query);
    // get related files from database
    if ($settings['related_files'] == 1) {
        $related_query = mysql_query("SELECT fileid, title, description, icon, iconlocation, timesplayed FROM ". $tbl_prefix ."files WHERE category = ". $file_row['category'] ." && status ='1' && fileid != ". $file_id ." ORDER BY RAND() LIMIT ". $settings['max_related_files']);
        while ($related_row = mysql_fetch_assoc($related_query))
            $txt['related'][] = array (
                'fileid'        =>  $related_row['fileid'],
                'title'         =>  $related_row['title'],
                'url'           =>  fileurl($related_row['fileid'],$related_row['title']),
                'description'   =>  $related_row['description'],
                'image'         =>  file_image_url($related_row['icon'], $related_row['iconlocation'])
            );
    }
        foreach ($txt['related'] as $related) {
        echo '
            <video id="'. $related['fileid'] .'">
            <title>'. $related['title'] .'</title>
            <thumb>', (str_replace('hqdefault.jpg', 'default.jpg',  $related['image'])) ,'</thumb>
            <url>'. $related['url'] .'</url>
            </video>';
        }   
echo '
</videolist>';
?>

这是jwplayer设置文件

    <div id="resize_file" style="width:{$width}px;height:{$height}px;">
    <script type="text/javascript" src="player/jwplayer.js"></script>
    <script type="text/javascript">
    jwplayer("container").setup({
            file:"{$file_url}",
            image: "{$file_image}",
            autostart: "true",
            aboutlink:"http://elfnon.com",
            abouttext:"elfnon.CoM",
            allowscriptaccess:"always",
            height: {$height},
            width: {$width},
            wmode:"opaque",
            volume:"100",
            icons:"true",
            bufferlength:"900",
            related: {
                file: '{$siteurl}/jw6-related.xml',
                onclick: 'link'
                        },
            modes:[
                { type:'html5' }
            ]
        });
jwplayer("container").onPlay(function () {
    setTimeout(function(){
        document.getElementById('container-holder').className = '';
    }, 1000);
});
    </script>

下:

autostart: "true",

加:

primary: "flash",

在HTML5模式下,您只能在其API中获得YouTube注释,但Flash模式会禁用它们。

相关内容

  • 没有找到相关文章

最新更新