dourao1896 2015-03-09 03:25
浏览 53

jwplayer具有相同的编辑

im using jwplayer for my script to get youtube videos

same edits i needed for my site to make player work good

same videos in youtube have tips so if i add it to my site it show tips without close button

how can i disable tips from youtube to stop it

exmaple for tips

other request how i make video preview from youtube like youtube player in jwplayer

and how to display related files (it work with old jwplayer but new jwplayer need same edit for make related work)

my sctipt is onaracde

and this is old 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>';

?>

and this is jwplayer settings file

    <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>
  • 写回答

1条回答 默认 最新

  • dongshuo8756 2015-03-09 03:46
    关注

    Under:

    autostart: "true",
    

    Add:

    primary: "flash",
    

    You only get the YouTube annotations in their API in HTML5 mode, but Flash mode will make them disabled.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用