【问题标题】:jwplayer with same edits具有相同编辑的 jwplayer
【发布时间】:2015-03-09 03:25:51
【问题描述】:

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

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

youtube 中的相同视频有提示,所以如果我将它添加到我的网站,它会显示提示而没有关闭按钮

如何禁用 youtube 的提示以阻止它

exmaple for tips

其他请求我如何从 youtube 上进行视频预览,例如 jwplayer 中的 youtube 播放器

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

我的脚本是 onaracde

这是旧的related.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>

【问题讨论】:

    标签: php youtube jwplayer


    【解决方案1】:

    下:

    autostart: "true",
    

    添加:

    primary: "flash",
    

    您只能在 HTML5 模式的 API 中获取 YouTube 注释,但 Flash 模式会使它们被禁用。

    【讨论】:

    • 但是当我从手机打开时,它会正常显示视频,还是会出现同样的问题?
    • 它会在移动设备上回退到 html5 并正常显示。试试吧,它会起作用的。
    • 是否要预览来自 youtube 和相关文件的视频?
    • ethan 你能帮我制作盗版文件和共享插件吗?这里的例子,但报复不起作用3eba.com/t891
    • 如果您使用 YouTube 视频,预览图像将使用 YouTube API 自动生成。不,您不能隐藏 Google Ads,因为 YouTube 使用那里的 API 需要它们。这里是如何设置分享-support.jwplayer.com/customer/portal/articles/…,这里是如何设置相关-support.jwplayer.com/customer/portal/articles/…
    猜你喜欢
    • 2015-02-11
    • 1970-01-01
    • 2011-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多