Recently, in a web project, the client asked to enter the start time and end time in the audition audio file, and then stopped from the start time to the end time. After searching a few times in google, I can't find related documents, only I have researched myself. In the beginning, I focused on the properties of the Media Player control and found the following related properties: CurrentPosition Returns or sets the current position of the clip (double). Duration Returns or sets the playback time (double) of the clip. SelectionEnd returns or sets the end position of the stream (double). SelectionStart returns or sets the starting position of the stream (double). After testing, you can achieve the required functionality by controlling the CurrentPosition property. The other three properties basically have no effect. However, when the page was placed on a remote server, it was found that the feature did not work. It turns out that when the buffer has not arrived at the start of the broadcast time, it is impossible to jump. Later, I was only able to study the Windows Media Player 9 Series SDK and found that the two elements STARTTIME and DURATION in the Windows Media Metafile Elements Reference are exactly what I need. To use these two elements you need to be in the asx file. The asx file format is as follows: <ASX VERSION="3.0"><TITLE>Your title here</TITLE><ENTRY><REF HREF ="audio file access path" />< STARTTIME VALUE="0:30.0" /><DURATION VALUE="00:50" /></ENTRY></ASX> After several tests, the program works. The problem is simple now. It is to let the user submit the start time and end time to generate the asx file, and then send the file to the media player. The following is the access interface I made: However, during the test, I found that the file was transferred, but the media player could not be played, it was strange. The test found that playing directly with the local media player is no problem, then the problem must be in the properties of the media player on the page. I reduced the media player's parameters to only one attribute left in the filename, and found that it actually went. Then set the autostart property to false and found that it doesn't work. Finally, I had to set the autostart property to true. The final player's property is set as follows: <param name="AutoStart" value="true"><param name="Filename" value=""><param name=" ShowPositionControls" value="true"><param name="ShowStatusBar" value="true">
Windows 7 settings use a program to open a file type 1, select default program in the Start menu.
Windows 7 adjusts visual effects to improve performance Settings. 3. Choose a visual effect. The
Laptop WiFi switch cant open solution? Wi-Fi Internet can be simply understood as wireless
windows 7 method to adjust screen brightness 1, start-control panel 2, click system and security
Comres.dll file parsing and download repair
Making a universal optical drive Chinese boot disk
Resolve DNS errors that prevent browsing failures
Teach you the C disk space is insufficient effective cleaning method
Windows system boot blue screen problem solving method experience skills summary
Solve the boot prompt boot.ini illegal fault
Windows 7 method to connect to the workspace
Win XP user and user group description
C disk space release 27 strokes! Use Vista without XP
Serv-U server Chinese garbled problem solution
Win10 system IE browser can not open the web page how to do?
Win10 modify the input method to switch shortcut keys Ctrl+Shift
How does win10 Spartan browser clean up the browser cache?
Amazon Amazon AWS Access Key Creation Tutorial
How to set Win8 system security mode
In-depth study on Lvs scheduling strategy
Win10 system activation method summary
Those well-known Win7 boot startup items
Win10 RTM Candidate Build 10176 Image Download Leak: 64-bit Simplified Chinese Enterprise Edition
Windows Server Security Policy and Group Policy Relationship