webForumDet fria alternativet

Hjälp med <object> och ljud

3 svar · 431 visningar · startad av Folkbitar

FolkbitarMedlem sedan feb. 2003168 inlägg
#1

Hejhej.

Jag försöker att få mina sidor att validera,
och stötte på problem med en av mina sidor
vilken innehåller <embed>.
Sökte lite här och fann att man istället ska använda
sej av <object>

Sagt och gjort.
Är inte riktigt hundra på hur man ska ställa in det hela.
Som det är nu funkar det i Firefox.
Men inte i IE6 eller Opera 7.2.
I IE händer ingenting och i Opera blir det en liten
ruta som man ska klicka på för att hämta lämpligt
insticksprogram. Bara det att det inte finns nåt sånt
att hämta...

Den lilla ljudfilen jag vill kunna starta och stoppa är
i formatet .wma och detta är den kod jag har lyckats
klura mej fram till:

<object codetype="audio/x-waw" data="musik/exempel/steinbukken_ex.wma" type="audio/x-aiff" declare name="Steinbukken" width="400" height="45" border="1" standby="Steinbukken"></object>

Det finns ju nåt med ClassID man kan lägga till.
Är det nåt man bör ha och i så fall hur vet jag
vilken ID jag ska hänvisa till?

/anders

mattiasnordinMedlem sedan maj 20012 080 inlägg
#2

Du kan läsa mer om detta på: http://faq.ozoneasylum.com/571/rating/

mattiasnordinMedlem sedan maj 20012 080 inlägg
#3

Insert the following OBJECT/EMBED tag in your Web page:

<OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="240" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="http://ServerHere/YourFolderHere/NameofYourMediaFileHere.wmv">
<PARAM NAME="autostart" VALUE="1">
<PARAM NAME="showcontrols" VALUE="0">
<EMBED TYPE="application/x-mplayer2"
SRC="http://ServerHere/YourFolderHere/NameofYourMediaFileHere.wmv"
WIDTH="320"
HEIGHT="240"
AUTOSTART="1"
SHOWCONTROLS="0">
</EMBED>
</OBJECT>

Directions:
The "type" attribute lets the browser know which plug-in to use to play the media.
The "src" attribute tells the plug-in what media to play and where it resides. The
"src" attribute can be the path to your media, an ".asx"reference file, or the mms path to the media. The "height" and "width" attributes are the dimensions of your media. If the media is audio only be sure to set the "height" and "width" to at least 2x2 or it may not work in all browsers. With attributes whose value can be “true” or "false" a "1" is used for "true" and a "0" for "false". The "autostart" attribute determines whether the clip starts playing automatically or not. The "showcontrols" attribute determines if the media controls are available to the viewer.The reason for the use of both the OBJECT and EMBED tag is to insure functionality in all browsers.

To prevent distortion of your video make sure that if the "showcontrols" attribute is set to "1", that you add 44 to the "height" attribute.

FolkbitarMedlem sedan feb. 2003168 inlägg
#4

Tack, Mattias! :bire

126 ms totalt · 3 externa anrop · v20260731065814-full.beb2e261
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
123 ms — hämta tråd, inlägg och bilagor (db)