flash 用 html 播放,使用flash插件在HTML上播放音頻

原文鏈接: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

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/534543.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/534543.shtml
英文地址,請注明出處:http://en.pswp.cn/news/534543.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

蘇大計算機學院在哪,蘇州大學和揚州大學都位于江蘇,這兩所大學,哪一所的實力更強?...

原標題:蘇州大學和揚州大學都位于江蘇,這兩所大學,哪一所的實力更強?一個朋友問我這么一個問題:“蘇州大學和揚州大學都位于江蘇,這兩所大學,哪一所的實力更強?”經常看到這么一句話…

科學計算機fx-82es,fx-82ES PLUS A -2卡西歐計算器-計算器 函數科學-卡西歐官方商城...

卡西歐官方商城只接受來自中國大陸地區的訂單,訂單配送范圍僅限中國大陸地區。發貨時間1.普通商品訂單:周一至周日均可發貨。當天17:00前的訂單可當天安排發貨,17:00后的訂單則第二天安排發貨。如遇量大及大型活動期間…

計算機技術博客博客知乎,我的技術博客的選擇:CSDN、博客園、簡書、知乎專欄仍是Github Page?...

有不少技術人員在學習到必定程度后發現了寫博客的重要性,一方面幫助本身記憶,一方面也能幫助他人解決問題,因而會選擇本身開始寫博客,以后又發現平臺太多不知從何下手,在這里我根據本身寫博客的經驗比較一下各個平臺的…

計算機文化基礎重點知識歸納,計算機文化基礎_第二章重點知識總結(考試必備!!!)...

操作系統:是管理軟硬件資源、控制程序執行、改善人機界面、合理組織計算機工作流程和為用戶使用計算機提供良好運行環境的一種系統軟件。操作系統的四種特性:并發性、共享性、虛擬性、異步性。并發性:是指兩個或兩個以上的運行程序在同一時間…

計算機入門 姚班,清華“姚班”:學霸中的尖子生,大佬畢業后都去哪了?

清華大學作為國內頂尖學府,其招收的都是來自全國各地的各種各樣頂尖的學子,不過,在這所頂級學府之中,還有一個班級被認為是尖子生的“尖子班”,能夠進入這個班級學習的學生可謂是鳳毛麟角,他們往往智商過人…

c++生成光柵條紋程序_共享屋:一文讓你認識光柵尺和編碼器

堅持學習與健身,是對自己最大的投資每天進步一點點共享屋數控機床電氣調試與維修微信:799309212大家好,我是共享屋,每天通過一篇文章分享我的經驗與觀察,希望能夠給你一些啟發或者幫助。分享的主題是有關數控機床電氣調…

計算機安全事故由誰整改,信息安全檢查整改方案 整改方案 .doc

信息安全檢查整改方案 整改方案篇一:信息安全檢查整改報告XX市工商行政管理局關于2012年信息安全檢查整改報告市公安局:4月18日貴單位對我局進行信息安全等級保護工作進行監督檢查后,按照《中華人民共和國計…

修改藍牙耳機按鍵映射_喜歡玩游戲的不要錯過了,五款高性能游戲藍牙耳機推薦...

隨著電競行業的發展,不少人都會在休閑時打打游戲娛樂一下,尤其是手游火爆以后,玩游戲的人就更多了,像是王者榮耀,和平精英,穿越火線等等,幾乎都是裝機必備。不過現在的游戲需要有很好的聲音呈現…

筆吧評測室所用測試軟件,這是一臺假游戲本:筆吧評測室 GIGABYTE 技嘉 Aero15 Classic-XA 游戲本 測評...

這是一臺假游戲本:筆吧評測室 GIGABYTE 技嘉 Aero15 Classic-XA 游戲本 測評2019-05-09 17:20:5118點贊26收藏21評論經常看我們日常推送的同學們最近都獲得了一個全新的知識點——高刷新率屏幕也有色彩差的了 !過去120Hz或者144Hz都至少搭載了72%NTSC色域…

https開頭的網址是什么意思_我想打這個面試官,他給我挖坑,問我:URI中的 “//” 有什么用?...

我們在瀏覽網頁的時候,需要在瀏覽器中輸入http://或者https://開頭的URL地址,類似http://honeypps.com,那么這里的"://"或者"//"有什么用呢?說到URL就不得不提URI了。用什么來標記服務器上的資源呢&#xff1…

計算機顯卡型號中數字含義詳解,顯卡型號中字母和數字所代表的含義

來源于電腦組裝網的DIY裝機知識,自己只是復制粘貼,更多人分享,提有用的顯卡型號中字母和數字所代表的含義作者: admin 來源: http://doc.xuehai.net 時間: 2012-12-22 閱讀:3419次發表文章我們在組裝電腦的時候,選擇顯卡肯定會比較慎重,顯卡貴的要幾千&a…

拖鏈電纜 機器人電纜_干貨!拖鏈電纜用途及安裝注意事項

拖鏈電纜主要應用于:工業自動化系統、生產流水線系統、焊機機器人、潛水器、等需要來回移動的場合。為了防止電纜糾纏、磨損、拉脫、掛和散亂,常把電纜放入電纜拖鏈中。拖鏈電纜用途普通拖鏈電纜具有彎曲性能、移動柔性、耐磨、耐油、抗拉等優點&#xf…

如果刪除網上服務器登陸賬號密碼,怎么清除SVN的用戶名和密碼

有些時候如果我們保存了SVN的登錄密碼后,我們需要在同一臺電腦上切換SVN用戶或者清除我們已經保存的SVN用戶名和密碼,下面是學習啦小編給大家整理的一些有關清除SVN的用戶名和密碼的方法,希望對大家有幫助!清除SVN的用戶名和密碼的方法安裝好…

使用場景_天然氣重卡使用痛點及應用場景研究

【商車邦導讀】天然氣重卡在使用中存在哪些痛點?什么樣的用戶更適合購買天然氣重卡?最近一段時間,雖然柴油價格處于歷史低位,但天然氣重卡依然持續熱銷,其中的原因主要有兩點:一個是國六排放升級&#xff0…

sat2 計算機科目,2019-2020年SAT2考試時間及Top100大學要求

在CB官網上,你會發現一個長長的名單,上面列出了所有將SAT科目考試(即SAT2)視為入學招生要求的大學名錄。雖然很多美國大學并沒有強制性的要求學生提供SAT2考試成績,但是如果你在考試中表現出色,這份成績單將作為錦上添花為申請大學…

的setinterval函數_ES6 極簡教程 lt;6gt; 函數擴展

1. 函數參數默認值用法如下{function test(x, y world) {console.log(默認值, x, y);}test(hello); // hello worldtest(hello, TH); // hello TH }2. rest 參數在不確定參數個數的時候,把輸入的參數都轉化為數組:注意: rest 參數后…

airpods2突然變得很小聲_11歲女孩胸部發育被同學取笑,穿束胸衣上課突然暈倒...

各位讀者大家好,感謝大家在百忙之中點開小編的文章,每次你們的閱讀和評論都是對于小編的認可。喜歡的話就先點擊上面的藍色字體 “溫州身邊事”,再點擊“關注”,就當做是對小編的鼓勵吧。下面我將帶領大家走進一個個的故事之間&a…

css黑色字白色描邊,css怎么設置字體白色描邊

CSS設置字體白色描邊1、使用text-stroke屬性text-stroke屬性用于向文本添加描邊。此屬性可用于更改文字的描邊寬度和顏色。使用-webkit-前綴支持此屬性。text-stroke是text-stroke-width和text-stroke-color(給文本填充顏色)兩個屬性的簡寫。語法:text-stroke: ;參數…

沒有shell63號單元_Ansys中Shell63單元和Shell41的比較

Ansys中Shell63單元和Shell41的比較Ansys中的Shell63號單元為板殼單元,可以模擬板殼的平面膜應力和平面彎曲,可以通過參數K1設置只有平面膜應力分量或/和平面彎曲分量;Shell41號單元為膜應力單元,僅具有平面膜應力分量&#xff0c…

向上傳文件服務器,向服務器上傳文件

//--------------------向服務器上傳文件------//瀏覽選擇需要上傳的文件private static bool Unzip(string address, string filezip){//創建對話框OpenFileDialog ofd new OpenFileDialog();ofd.Title "請選擇上傳的文件";//規定文件類型ofd.Filter "zip(*…