0

Hi,

I am working on video player module.
I am trying to add dynamic video links & description.Its working fine.
the problem is when i am playing a video,video list become readonly.

Need suggestion

<!doctype html>
<html>
<head>

    <title>Video Player Application</title>
    <link rel="shortcut icon" href="/media/favicon.png">
    <!-- standalone page styling. can be removed -->
    <style>
        body{
            width:982px;
            margin:50px auto;
            font-family:sans-serif;
        }
        a:active {
            outline:none;
        }
        :focus { -moz-outline-style:none; }

        .palert {
            padding: 12px;
            color: black;
            background-color: #ededed;
            box-shadow: none;
        }
    </style>



    <!-- flowplayer javascript component -->
    <script src="http://releases.flowplayer.org/js/flowplayer-3.2.8.min.js"></script>


</head>



    <body>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"
        type="text/javascript" charset="utf-8"></script>
    <script src="http://releases.flowplayer.org/js/flowplayer.playlist-3.2.8.min.js"
        type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="playlist.css"/>
    <style>
        /* container has a background image */

    a.player {
        display:block;
        width:500px;
        height:340px;
        text-align:center;
        color:#fff;
        text-decoration:none;
        cursor:pointer;
        background:#000 url(/media/img/global/gradient/h500.png) repeat-x 0 0;
        background:-moz-linear-gradient(top,
                                        rgba(55, 102, 152, 0.9),
                                        rgba(6, 6, 6, 0.9));
        -moz-box-shadow:0 0 40px rgba(100, 118, 173, 0.5);
    }

    a.player:hover {
        background:-moz-linear-gradient(center top,
                                        rgba(73, 122, 173, 0.898),
                                        rgba(6, 6, 6, 0.898));
    }

    /* splash image */
    a.player img {
        margin-top:125px;
        border:0;
    }    a.player {
            margin-top:0px;
        }
    </style>
    </c:if>


    <script>
    $(function() {
        // set up player without "internal" playlists
        $f("player2", "http://releases.flowplayer.org/swf/flowplayer-3.2.9.swf", {
            clip: {baseUrl: 'http://blip.tv/file/get'}


        // use playlist plugin. again loop is true
        }).playlist("div.petrol", {loop:true});
    });
    </script>

    <!-- configure entries inside playlist using standard HTML -->
    <div class="clips petrol" style="float:left">
    <?php
    $conn = mysql_connect('localhost','root','');
    if(!$conn) die("Failed to connect to database!");
    $status = mysql_select_db('video_player');
    if(!$status) die("Failed to select database!");
    $query=mysql_query("SELECT * from video_list");
    while($row = mysql_fetch_array($query))
      {
      //echo $row['v_id'];
      ?>


        <!-- single playlist entry -->
        <a href="<?php echo $row['v_link'] ?>">
            <?php echo $row['v_desc'] ?>
            <span>HTTP streaming</span>
            <em>0:20 min</em>
        </a>
      <?php
      }
     ?>  

    </div>

    <!-- player container and a splash image (play button) -->
    <a class="player plain" id="player2"  style="float:left">
        <img class="button" src="/media/img/player/btn/play_text_large.png" />
    </a>

    <!-- let rest of the page float normally -->
    <br clear="all"/>
    </body>

    </html>

Edited by diafol: apply code tags

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by veedeoo
0

Its working fine for HTMl code.

Need suggestions.

<div class="clips petrol" style="float:left">

    <!-- single playlist entry -->
    <a href="http://happylandings.in/demo/free.flv" class="first">
        Palm trees and the Sun
        <span>HTTP streaming</span>
        <em>0:20 min</em>
    </a>

    <a href="KimAronson-TwentySeconds58192.flv">
        Happy feet inside a car
        <span>HTTP streaming</span>
        <em>0:20 min</em>
    </a>

    <a href="KimAronson-TwentySeconds63617.flv">
        Park side life
        <span>HTTP streaming</span>
        <em>0:20 min</em>
    </a>

</div>

Edited by diafol: tidied code tags

0

Hi,

This should be your own domain's uploads directory or the video loaction of the items in the playlist.

clip: {baseUrl: 'YourDomainDotCom/videoDirectory/'}

And then, in your database query result while loop, your php codes should be somthing similar to my untested codes below. Echoed brackets are for the javascript.

 $query=mysql_query("SELECT * from video_list");

 ## You need to count the items in the 
 $v_count = mysql_num_rows($query);
 echo "playlist: [ ";
        echo "{";

        $x = 0;
        while($row = mysql_fetch_array($query)){
        $x++;

            echo "url: '".$row['filenameOfYourVideo'].".flv',";
            echo "title: '".$row['titleOfThisVideo']."'";

        if($x < $v_count){
         echo "},";

         }

         else{

         echo "}";
         }
         }

         echo "],";

         ?>

Edited by veedeoo

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.