原文链接:WordPress Audio Player 非插件方式使用方法

Standalone version

The standalone version comes with a JavaScript file to simplify configuring and embedding the player. This file includes theswfobject library.

Note: the zip file includes two other files:

audio-player-noswfobject.js (a version of audio-player.js without the swfobject library if you are including it separately)

audio-player-uncompressed.js (same as above but uncompressed so you can read the code)

Installation and usage

Download the zip file

Extract and upload the files to your server (only two files are required: audio-player.js and player.swf)

Include the audio-player.js file in the HEAD section of your html page

Still in the HEAD section, setup Audio Player as seen in the example below (the only required option is width)

To insert a player on the page, place an HTML element (a P tag in the example but it can be anything) and give it a unique ID

This element will be replaced with a player. If the browser doesn’t support Audio Player, the element will not be replaced so use it to show alternative content (maybe a message telling the user to download Flash)

Insert the script tag after the element as shown below

Example

Ensure you replace “http://yoursite.com/path/to” with the correct paths to all files.

Your websitetitle>

...

script>

AudioPlayer.setup("http://yoursite.com/path/to/player.swf", {

width: 290

});

script>

head>

Alternative contentp>

AudioPlayer.embed("audioplayer_1", {soundFile: "http://yoursite.com/path/to/mp3_file.mp3"});

script>

Alternative contentp>

AudioPlayer.embed("audioplayer_2", {soundFile: "http://yoursite.com/path/to/mp3_file_2.mp3"});

script>

body>

html>

Configuration

You can configure Audio Player with the setup call in the HEAD section like this:

script>

AudioPlayer.setup("http://yoursite.com/path/to/player.swf", {

width: 290,

initialvolume: 100,

transparentpagebg: "yes",

left: "000000",

lefticon: "FFFFFF"

});

script>

You can configure each separate player using the embed call like this:

AudioPlayer.embed("audioplayer_1", {

soundFile: "http://yoursite.com/path/to/mp3_file.mp3",

titles: "Title",

artists: "Artist name",

autostart: "yes"

});

script>

To load multiple files

Simply set soundFileto a comma delimited list of mp3 files. Optionally, you can also provide a comma delimited list of titles and artists:

AudioPlayer.embed("audioplayer_1", {

soundFile: "http://yoursite.com/path/to/mp3_file_1.mp3,http://yoursite.com/path/to/mp3_file_2.mp3",

titles: "Title 1,Title 2",

artists: "Artist name 1,Artist name 2"

});

script>

List of options

Tracks

Option

Default

Description

soundFile

required

comma-delimited list of mp3 files

titles

overrides ID3 information

comma-delimited list of titles

artists

overrides ID3 information

comma-delimited list of artists

Options

Option

Default

Description

autostart

no

if yes, player starts automatically

loop

no

if yes, player loops

animation

yes

if no, player is always open

remaining

no

if yes, shows remaining track time rather than ellapsed time

noinfo

no

if yes, disables the track information display

initialvolume

60

initial volume level (from 0 to 100)

buffer

5

buffering time in seconds

encode

no

indicates that the mp3 file urls are encoded

checkpolicy

no

tells Flash to look for a policy file when loading mp3 files

(this allows Flash to read ID3 tags from files hosted on a different domain)

rtl

no

switches the layout to RTL (right to left) for Hebrew and Arabic languages

Flash player options

Option

Default

Description

width

required

width of the player. e.g. 290 (290 pixels) or 100%

transparentpagebg

no

if yes, the player background is transparent (matches the page background)

pagebg

NA

player background color (set it to your page background when transparentbg is set to ‘no’)

Colour scheme options

All colour codes must be 6-digit HEX codes without ‘#’ or ’0x’ in front.

Option

Default

Description

bg

E5E5E5

Background

leftbg

CCCCCC

Speaker icon/Volume control background

lefticon

333333

Speaker icon

voltrack

F2F2F2

Volume track

volslider

666666

Volume slider

rightbg

B4B4B4

Play/Pause button background

rightbghover

999999

Play/Pause button background (hover state)

righticon

333333

Play/Pause icon

righticonhover

FFFFFF

Play/Pause icon (hover state)

loader

009900

Loading bar

track

FFFFFF

Loading/Progress bar track backgrounds

tracker

DDDDDD

Progress track

border

CCCCCC

Progress bar border

skip

666666

Previous/Next skip buttons

text

333333

Text

flash 用 html 播放,使用flash插件在HTML上播放音频相关推荐

  1. 用vlc插件在页面上播放海康rtsp推流监控

    原文链接:https://blog.csdn.net/weixin_43948724/article/details/104422825 vlc插件目前只能在360.搜狗等可以开启兼容模式下的浏览器使 ...

  2. 将台式电脑声音无线传输到IOS,安卓手机上播放,再到蓝牙音箱上播放

    台式电脑连接蓝牙音箱 确保台式机(装有无线网卡.无线驱动等).手机.蓝牙音箱在同一无线网络环境下 软件平台: SoundWire 是一款可以将电脑的声音通过 WIFI 无线网络传送至 Android ...

  3. unity3d 使用UMP 插件在安卓上 播放H264视频流 不显示问题

    此问题是 由于unity3D在安卓上 使用UMP 插件 播放 H264视频流,需要 添加vlc组件:需要在电脑上安装 VLC:然后 在unity3D    上使用, 每次打包时 需要在unity设置界 ...

  4. mp4+html+ipad无法播放,mp4文件不能在IPAD上播放

    苹果平板电脑(ipad)的文件格式支持: 视频: 1.H.264 视频:高达 1080p.60 fps.High Profile level 5.0 编码,其音频为 AAC-LC 音频,高达 160 ...

  5. php手机播放音乐代码,在手机浏览器上播放音乐的代码

    今天心血来潮想给自己的一个网页做上背景音乐,并在手机浏览器上支持播放,翻了很多地方,尝试了无数个代码,终于让我找到一个解决办法,相信对很多php程序开发会有帮助的. 代码如下: 您的浏览器不支持音频播 ...

  6. html能播放wav,html – 在iOS Safari上播放WAV文件

    我很难将HTML页面上的WAV文件作为HTML5音频标签或通过移动Safari(iPad / iPhone)中的常规可下载链接播放: audio HTML5音频对象只显示无法播放音频文件,当我点击下载 ...

  7. 在ipad上播放flash大集合

    由于jobs封杀flash,苹果的任何产品都不能播放flash,但是不能播放flash是一大遗憾,于是有不少人和公司在ipad/iphone上播放flash做出努力,现收集了一些播放flash的资料, ...

  8. linux 中文 音乐播放器,linux下的常见音乐播放器

    xmms 老牌的音乐播放器,模仿Windows下*的播放器Winamp,其强大的功能不输于Winamp,具有极强的可扩展性,支持mp3.ogg.wav等格式播放,添加插件后还可以播放AAC.wma等格 ...

  9. 计算机无法播放asf格式,ASF文件怎么打开播放出来?

    如果你遇到视频是ASF格式的,你知道怎么打开吗?asf的全称是Advanced Streaming Format,是微软所制订的一种媒体播放格式,适合在网络上播放,基于Windows Media的文件 ...

最新文章

  1. (Builder)建造者模式的Java实现
  2. Redis进阶-Jedis以及Spring Boot操作 Redis 5.x Cluster
  3. c语言实战1200例 pdf6,C语言程序设计6.6.2.pdf
  4. 旅行商问题动态规划matlab,旅行商问题的解法
  5. android 弹出PopupWindow后背景逐渐变暗
  6. linux-搜索查找类
  7. 软件业的作业示意流程图
  8. Asp.Net Core 中IdentityServer4 实战之角色授权详解
  9. 德标螺纹规格对照表_抚顺船用外螺纹铜减压阀带NK船检证书
  10. 手机wps怎么设置语言_怎么使用手机对路由器进行设置
  11. 毫秒级百万数据分页存储过程(mssql)
  12. postman websocket_postman的“替代者”postwoman的使用体验—从入门到放弃
  13. 二次与三次B样条曲线c++实现
  14. 如何设计更好的脉搏血氧仪:实施
  15. Taylor Swift -- Crazier 附英文和中文歌词
  16. python如何下载安装spacy_Python spaCy
  17. 将距离度量学习应用于购物问题
  18. DNS劫持、流量劫持,HTTP/HTTPS劫持
  19. vue重复访问同一路由报错
  20. 情报板/路政/枪机/卡口/监控类摄像机

热门文章

  1. 浩鲸新智能解决方案工程师面试_【华为解决方案工程师面试题目|面试经验】-看准网...
  2. qt中颜色对话框弹出时应用程序输出栏出现QWindowsWindow::setGeometry: Unable to set geometry 180x30+345+311 (frame: 202x8
  3. printf函数输出多个printf 、前置加加或者后置加加
  4. 潍坊经贸每年单招计算机的成绩,2018潍坊职业学院单招成绩查询时间
  5. linux隔一级目录找文件,linux查看文件和子目录
  6. Android连接相机WiFi,安卓手机使用佳能相机机身wifi传输拍摄的操作
  7. cross_val_score 如何对孤立森林_【收藏】森林防火手抄报素材汇总!
  8. html加粗字体打印失效_论文格式要求及字体大小
  9. mysql用户信息备份还原_mysql迁移之新建用户、备份还原数据库
  10. 1445.32php,nginx实现mysql的负载均衡