当前位置:网站首页>Edit the live broadcast source code with me. How to write the live broadcast app code
Edit the live broadcast source code with me. How to write the live broadcast app code
2022-06-28 09:09:00 【Tai'an yunbao Technology】
The live broadcasting industry is becoming more and more popular , People's enthusiasm for live video broadcasting is also enduring , The technicians of cloudleopard live broadcast teach you to write a small live video clip here .
Windows Media Player series ( Different panel styles )
Comprehensive type :
id=MediaPlayer type=application/x-oleobject width=210 height=340 standby=“Loading Microsoft Windows Media Player components…” VIEWASTEXT align=MIDDLE>
Simple :
http://www.*.com/mediadate/lxlhbcn.asf style=“HEIGHT: 45px; WIDTH: 190px” type=audio/mpeg AUTOSTART=“1” loop=“0”>
Label type :
Quotes
The appearance interface of the media player
In the web page , You can control which parts of the media player appear through related properties , Which parts do not appear .
The media player includes the following elements :
Video Display Panel: Video display panel ;
Video Border: Video border ;
Closed Captioning Display Panel; Subtitle display panel ;
Track Bar; Search bar ;
Control Bar with Audio and Position Controls: Control bar with sound and position control ;
Go To Bar: Go to column ;
Display Panel: Display panel ;
Status Bar: status bar ;
The following attributes are used to determine which element to display :
ShowControls attribute : Whether to display the control bar ( Including playback controls and optional sound and position controls );
ShowAudioControls attribute : Whether to display the sound control in the control bar ( Mute button and volume slider );
ShowPositionControls attribute : Whether to display the position control in the control bar ( Including jumping back 、 Fast back 、 Fast forward 、 Jump forward 、 Preview each clip in the playlist );
ShowTracker attribute : Whether to display the search bar ;
ShowDisplay attribute : Whether to display the display panel ( Used to provide information about programs and clips );
ShowCaptioning attribute : Whether to display the subtitle display panel ;
ShowGotoBar attribute : Whether to display the go to column ;
ShowStatusBar attribute : Is the status bar displayed ;
Playlist
The media player provides the following methods to access clips in the playlist :
Next Method , Jump to program ( Playlist ) The next clip in ;
Previous Method , Jump back to the previous clip in the program ;
A feature of the media player is the ability to preview every clip in the program , Use the following properties :
PreviewMode attribute , Determines whether the media player is currently in preview mode ;
CanPreview attribute , Determines whether the media player can be in preview mode ;
stay windows In the media metafile , You can specify a preview time for each clip ——PREVIEWDURATION, If not specified , The default preview time is 10 Second .
You can also use it Windows Media metafile to add watermarks And banners, Metafile also supports seamless stream switching when inserting advertisements .
Program information
Use GetMediaInfoString Method can return the following information about the relevant clip or program :
file name :File name
title :Title
describe :Description
author :Author
Copyright :Copyright
Level :Rating
URLs:logo icon、watermark、banner The address of
Clip information can be placed in media files , It can also be placed in Windows In the media metafile , Or both . If clip information is specified in the metafile , Then use GetMediaInfoString Method returns the information in the metafile , The information contained in the clip is not returned .
In the metafile , Additional information can be placed on each clip or program PARAM In the label . You can add as many as you like to each clip PARAM label , Used to store customized information or link to related sites . stay PARAM The information in the tag can be accessed through GetMediaParameter Method to access .
The following properties return information about size and time :
ImageSourceHeight、ImageSourceWidth: Returns the display size of the image window ;
Duration attribute , Returns the length of the clip ( second ), To check whether this property contains a valid value , Please check IsDurationValid attribute .( For broadcast video , Its length is unpredictable ).
subtitle
You can use it. .smi File to add subtitles to your program . The media player supports the following properties to handle subtitles :
SAMIFileName attribute , Appoint .smi Name of file ;
SAMILang attribute , Specifies the language of the subtitle ( If not specified, use the first language );
SAMIStyle attribute , Specify the text size and style of subtitles ;
ShowCaptioning attribute , Decide whether to display the subtitle display panel ;
Script command
Accompanying audio 、 Video streaming , You can add script commands to the streaming media files . Script commands are many pairs of multimedia streams synchronized with a specific time Unicode strand . The first string identifies the type of command to be issued , The second string specifies the command to execute .
When the stream plays to the time related to the script , Control will send a... To the web page ScriptCommand event , The event handler then responds to the event . The script command string is passed to the event handler as a parameter of the script command event .
The media player will automatically process the following types of embedded script commands :
- URL Type command : When the media player control receives a URL Type command , designated URL Will be loaded into the user's default browser . If the media player is embedded in a sub frame HTML In file ,URL Pages can be loaded into frames specified by script commands . If the script command does not specify a frame , Will be made by DefaultFrame Attribute determines that URL Which frame the page loads .
You can set up InvokeURLs Property to determine whether to process automatically URL Type script command . If the value of this property is false , Media player controls will ignore URL Type command . But script command events still trigger , This allows you to deal selectively with URL Type command .
URL The type command specifies URL Relative address of . The base address is defined by BaseURL Property specified . The command parameter of the script command event transmitted by the media player control is the linked address . - FILENAME Type command : When the media player control receives a FILENAME Type command , It will FileName Property to the file provided for the script command , After that, the media player will open the file and start playing . Media player controls are always handled automatically FILENAME Type command , Don't like URL Type command , They cannot be banned .
- TEXT Type command : When the media player control receives a TEXT Type command , It will display the contents of the command in the subtitle window of the control . The content can be plain text , It can also be HTML.
- EVENT Type command : When the media player control receives a EVENT Type command , It will search the media metafile EVENT Elemental NAME attribute . If NAME Property matches the second string in the script command , The media player control is included in EVENT Element .
- OPENEVENT Type command : When the media player control receives a OPENEVENT Type command , It checks in the media metafile EVENT Elements , And open the matching title , But don't play , Until you receive from EVENT A real event of the same name for a type command .
A simple live video is such a huge writing process , As one can imagine , A whole set of live broadcast APP How much time does the source code take
边栏推荐
- 小程序 :遍历list里面的某个数组的值,等同于 for=“list” list.comment里面的某一项
- JMeter -- interface test 2
- Three body attack (three-dimensional split plus two points)
- 静态代码块永远先执行? 格局小了!!!
- Divide and rule classic Hanoi
- Where is CentOS mysql5.5 configuration file
- Assertions used in the interface automation platform
- 状态机程序框架
- What are the advantages of a differential probe over a conventional probe
- 批量修改表和表中字段排序规则
猜你喜欢

From knowledge to wisdom: how far will the knowledge map go?

SQL注入之文件读写

Calcul des frais d'achat et de vente d'actions

Discussion on the improvement and application of the prepayment system in the management of electricity charge and price

Common tools for interface testing --postman

Deployment of MySQL database in Linux Environment

APICloud携手三六零天御,助力企业守好App安全“第一关”

Almost union find (weighted union search)

为什么SELECT * 会导致查询效率低?

Discussion on safety management of centralized maintenance construction site of substation under the mode of operation and maintenance
随机推荐
Guangzhou: new financial activities and new opportunities for enterprises
Common tools for interface testing --postman
Data modeling based on wide table
如何实现基于 RADIUS 协议的双因子认证 MFA?
Implementation of code scanning login
Applet: traverse the value of an array in the list, which is equivalent to for= "list" list An item in comment
Power data
1. Kimball dimension modeling of data warehouse: what is a fact table?
Construire le premier réseau neuronal avec pytorch et optimiser
Copy & Deepcopy
RMAN backup message ora-19809 ora-19804
High rise building fire prevention
[share OpenGL tutorial]
Avframe Memory Management API
Valentine's Day - VBS learning (sentences, love words)
用Pytorch搭建第一个神经网络且进行优化
Analysis of prepaid power purchase device
实现全局双指长按返回桌面
Apache Doris becomes the top project of Apache
基于宽表的数据建模