Click here to Skip to main content
15,894,955 members

how to get the (media player)paused time in text box

saravana__ asked:

Open original thread
This is my code to play videos in asp.net application..........if i pause the video get the paused time in text box.......
so how to get the paused time in text box.........
pls hlp me.......

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default13.aspx.cs" Inherits="Default13" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript">
<!--
       var WMState = new Array();
        WMState[0]  = "Undefined";

        WMState[1]  = "Stopped";

        WMState[2]  = "Paused";

        WMState[3]  = "Playing";

        WMState[4]  = "Scan Forward";

        WMState[5]  = "Scan Reverse";

        WMState[6]  = "Buffering";

        WMState[7]  = "Waiting";

        WMState[8]  = "Media Ended";

        WMState[9]  = "Transitioning";

        WMState[10] = "Ready";

        WMState[11] = "Reconnecting";

        function Status ()
        {
                 x = Player.playState;

                 alert("Windows Media Player is " + WMState[x] + "\r\r" + "Player Version:" + Player.versionInfo);

        }

        function Play ()
        {
                 x = Player.playState;

                 if (x == 2) {

                    Player.controls.play();

                 }else{

                    Player.URL = "video.mpeg";

                 }

        }
        function Pause ()
        {

                 Player.controls.pause();



        }

        function Stop () {

                 Player.controls.stop();


        }
-->
</script>

</head>
<body>
   <object id="Player" width="320" height="300" type ="video/x-ms-wmv">

        <param name = "Volume" value="50"/>

        <param name = "AutoStart" value="True"/>

</object>

<br />


<input type="button" name="BtnPlay"    value="Play"     accesskey="q"  onclick="Play()"/>

<input type="button" name="BtnPause"   value="Pause"    accesskey="w"  onclick="Pause()"/>

<input type="button" name="BtnStop"    value="Stop"     accesskey="s"  onclick="Stop()"/>

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</body>
</html>


pls hlp me.......
Tags: ASP.NET

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900