Bradmax Player is a plugin, which supports video streams playback on desktops and mobile devices.
Bradmax Player 是一个插件,支持在台式机和移动设备上播放视频流。
If you have access to video streaming in formats:
如果您可以使用以下格式的视频流:
– HLS
– HLS
– MPEG-DASH
– MPEG-DASH
– MS Smooth Streaming
– MS流畅流媒体
or simple mp4, webM, ogg files, then you can watch them on your site with Bradmax Player.
或简单的mp4,webM,ogg文件,那么您可以使用Bradmax Player在您的网站上观看它们。
It is even supporting HLS or MS Smooth Streaming playback on platforms / devices, which
它甚至还支持平台/设备上的HLS或MS平滑流播放,这
usually not support them.
通常不支持他们。
In such cases video is “transconded” on-fly in your browser during playback.
在这种情况下,视频会在播放期间在浏览器中即时“转译”。 p>
Player support also:
玩家支持: p>
- poster image – Custom image from video, which is displayed on player before playback.
- 海报图像–视频中的自定义图像,在播放之前显示在播放器上。 li>
- subtitles – Embedded in HLS, MPEG-DASH, MS Smooth Streaming video stream or from external files in SRT, VTT file formats.
- 字幕–内置于HLS,MPEG-DASH,MS Smooth Streaming视频流中,或来自SRT,VTT文件格式的外部文件。 li>
- basic video statistics for Google Analytics – Just paste your Google Analytics tracker id into player settings for collecting information about video views and watched time.
- Google Analytics(分析)的基本视频统计信息–只需将您的Google Analytics(分析)跟踪器ID粘贴到播放器设置中,即可收集有关视频观看次数和观看时间的信息。 li>
ul>
Requirements
要求 h4>
[bradmax_video url="https://bradmax.com/static/video/tos/big_buck_bunny.m3u8" duration="596" poster="https://bradmax.com/static/images/startsplash [bradmax_video url =“ https://bradmax.com/static/video/tos/big_buck_bunny.m3u8” duration =“ 596” poster =“ https://bradmax.com/static/images/startsplash .jpg"]
.jpg“]
code> pre>
- “url” is the location of your streaming.
- “ URL”是您流媒体的位置。
You need to replace the sample URL with the actual URL of the video stream.
您需要将示例URL替换为视频流的实际URL。 li>
- “duration” contain length in seconds of video, so it can be displayed on player before staring playback.
- “持续时间”包含以秒为单位的视频时长,因此可以在开始播放之前将其显示在播放器上。 li>
- “poster” is location of poster image, which should be displayed on player.
- “海报”是海报图像的位置,应在播放器上显示。
Replace sample URL with link of your image.
用图片的链接替换示例URL。 li>
ul>
Video playback statistics with Google Analytics
使用Google Analytics(分析)的视频播放统计信息 h4>
Player can collect basic statistics for video playback.
玩家可以收集视频播放的基本统计信息。
You just need to copy your “Tracking ID” from Google Analytics page into player settings.
您只需要将“跟踪ID”从Google Analytics(分析)页面复制到播放器设置中即可。 p>
For finding “Tracking ID” please open: Google Analytics > Admin > Tracking Info > Tracking Code .
要查找“跟踪ID”,请打开: Google Analytics(分析)>管理>跟踪信息>跟踪代码。
p>
>
“Tracker ID” is code having form “UA-XXXXXXXX-X”, where X is 0-9 digit and you have to copy it into ga_tracker_id video shortcode option (see section below).
“跟踪器ID”是格式为“ UA-XXXXXXXX-X”的代码,其中X为0-9数字,您必须将其复制到ga_tracker_id视频短码选项中(请参见下文)。 p>
Player collects video playback details as “Events” in your Google Analytics account.
Player在您的Google Analytics(分析)帐户中将视频播放详细信息收集为“事件”。
There are available in sections:
有可用的部分: p>
- Google Analytics panel > Real-Time > Events
- Google Analytics(分析)面板>实时>事件 li>
- Google Analytics panel > Behaviour > Events
- Google Analytics(分析)面板>行为>事件 li>
ul>
Player is sending events:
玩家正在发送事件: p>
- event category: view , event action: started (send on starting video playback)
- 事件类别:查看,事件操作:已开始(在开始播放视频时发送) li>
- event category: player event, event action: playing/paused (send on play/pause video)
- 事件类别:播放器事件,事件动作:播放/暂停(在播放/暂停视频上发送) li>
- event category: progress seconds, event action: progress seconds (send every 10 sec of playback)
- 事件类别:进度秒,事件动作:进度秒(每10秒发送一次) li>
ul>
For each media distinction in statistics you have to specify in video shortcode option “media_id”.
对于每种媒体统计差异,您必须在视频短码选项“ media_id”中指定。
Then each event got additionaly “Event Label” with data provided from media_id parameter.
然后,每个事件都具有由media_id参数提供的数据的附加“事件标签”。
media_id can be any text, which you want to define, but it is recomended to keep it short.
media_id可以是您想要定义的任何文本,但是建议您使用简短的文本。 p>
Video Shortcode Options
视频简码选项 h4>
The following options are supported in the shortcode.
简码支持以下选项。 p>
Autoplay
自动播放 strong> p>Causes the video file to automatically play when the page loads.
使视频文件在页面加载时自动播放。
Note: Currenlty this option is working only on desktop devices with muted sound (see “Mute” shortcode).
注意:Currenlty此选项仅在声音静音的台式机设备上有效(请参阅“静音”简码)。
On mobile devices (phones, tablets, etc.) this option is not working.
在移动设备(电话,平板电脑等)上,此选项不起作用。
It is platform limitation and clicking on video is required for starting playback.
这是平台的限制,必须点击视频才能开始播放。 p>
[bradmax_video url="http://example.com/hls_stream.m3u8" autoplay="true"] [bradmax_video url =“ http://example.com/hls_stream.m3u8” autoplay =“ true”]
code> pre>
Mute
静音 strong> p>Causes the video starts with muted sound.
导致视频以静音播放。
This option is usefull for starting video automatically with “autoplay” option.
此选项对于使用“自动播放”选项自动开始播放视频很有用。 p>
[bradmax_video url="http://example.com/hls_stream.m3u8" autoplay="true" mute="true"] [bradmax_video url =“ http://example.com/hls_stream.m3u8” autoplay =“ true”静音=“ true”]
code> pre>
Duration
持续时间 strong> p>Defines length of video stream in seconds.
以秒为单位定义视频流的长度。
Can contain fraction of second.
可以包含秒的分数。
It is required for displaying duration of video before staring playback.
在开始播放之前显示视频的持续时间是必需的。 p>
[bradmax_video url="http://example.com/hls_stream.m3u8" duration="100.1"] [bradmax_video url =“ http://example.com/hls_stream.m3u8” duration =“ 100.1”]
code> pre>
Poster
海报 strong> p>Defines image to show as placeholder before the video plays.
定义图像以在视频播放之前显示为占位符。 p>
[bradmax_video url="http://example.com/hls_stream.m3u8" poster="http://example.com/wp-content/uploads/poster.jpg"] [bradmax_video url =“ http://example.com/hls_stream.m3u8” poster =“ http://example.com/wp-content/uploads/poster.jpg”]
code> pre>
Class
课程 strong> p>Defines CSS class, which should be added into player box on page (customizing view on WordPress page).
定义CSS类,应将其添加到页面的播放器框中(自定义WordPress页面上的视图)。 p>
[bradmax_video url="http://example.com/hls_stream.m3u8" class="my-custom-player-css-class"] [bradmax_video url =“ http://example.com/hls_stream.m3u8” class =“ my-custom-player-css-class”]
code> pre>
Style
样式 strong> p>Defines CSS style string, which should be added into player for on page (customizing view on WordPress page).
定义CSS样式字符串,应将其添加到页面的播放器中(自定义WordPress页面上的视图)。 p>
[bradmax_video url="http://example.com/hls_stream.m3u8" style="width:400px;height:200px;border:solid 1px gray"] [bradmax_video url =“ http://example.com/hls_stream.m3u8” style =“ width:400px; height:200px; border:solid 1px grey”]
code> pre>
Subtitles
字幕 strong> p>Defines list of subtitles files (one file per language) for video.
定义视频字幕文件列表(每种语言一个文件)。
Subtitles files has to be in SRT or VTT format (file extension *.srt or *.vtt).
字幕文件必须为SRT或VTT格式(文件扩展名为* .srt或* .vtt)。
Format for subtitles list subtitles=”LANG_CODE=FILE_LINK LANG_CODE=FILE_LINK …”, where LANG_CODE is two letter language code (ISO 639-1 standard – https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for defining subtitles language
字幕列表字幕的格式=“ LANG_CODE = FILE_LINK LANG_CODE = FILE_LINK…”,其中LANG_CODE是用于定义字幕语言的两个字母的语言代码(ISO 639-1标准– https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
.
。
FILE_LINK is link to file stored on some HTTP server, which player will be able to download during playback.
FILE_LINK是指向某些HTTP服务器上存储的文件的链接,播放器将能够在播放期间下载该文件。 p>
Working example (subtitles in Czech language):
工作示例(捷克语字幕) p>
[bradmax_video url="https://bradmax.com/static/video/tos/tesla/tesla.m3u8" subtitles="cz=https://bradmax.com/static/video/tos/ [bradmax_video url =“ https://bradmax.com/static/video/tos/tesla/tesla.m3u8”字幕=“ cz = https://bradmax.com/static/video/tos/ tesla/tesla_cz.srt"]
tesla / tesla_cz.srt“]
code> pre>
Example with multiple languages for video:
具有多种语言的视频示例: p>
[bradmax_video url="http://example.com/hls_stream.m3u8" subtitles="en=https://example.com/subtitles_en.srt cz=https://example.com/subtitles_cz [bradmax_video url =“ http://example.com/hls_stream.m3u8” subtitles =“ zh-cn = https://example.com/subtitles_en.srt cz = https://example.com/subtitles_cz .srt sk=https://example.com/subtitles_sk.srt"]
.srt sk = https://example.com/subtitles_sk.srt“]
code> pre>
ga_tracker_id
ga_tracker_id strong> p>Defines Google Analytics tracker id.
定义Google Analytics(分析)跟踪器ID。
When defined video playback is tracked in your Google Analytics account in “Events” sections.
在Google Analytics(分析)帐户的“事件”部分中跟踪定义的视频播放后。 p>
“Tracker ID” is code having form “UA-XXXXXXXX-X”, where X is 0-9 digit and is located in
“跟踪器ID”是格式为“ UA-XXXXXXXX-X”的代码,其中X为0-9数字,位于
>Google Analytics > Admin > Tracking Info > Tracking Code.
> Google Analytics(分析)>管理员>跟踪信息>跟踪代码。 p>
Example:
示例: p>
[bradmax_video url="http://example.com/hls_stream.m3u8" ga_tracker_id="UA-XXXXXXXX-X" media_id="my example stream"] [bradmax_video url =“ http://example.com/hls_stream.m3u8” ga_tracker_id =“ UA-XXXXXXXX-X” media_id =“我的示例流”]
code> pre>
media_id
media_id strong> p>This parameter is used, when Google Analytics plugin is active (see ga_tracker_id video shortcode).
当Google Analytics(分析)插件处于活动状态时,使用此参数(请参阅ga_tracker_id视频短代码)。
It is used for each media distinction, so for each different video diferent value should be provided.
它用于每种媒体区分,因此应为每种不同的视频提供不同的值。
It can be any text, but it is recomended to keep it short.
它可以是任何文本,但建议保持简短。 p>