A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Streaming Media

  1. #1
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797

    Streaming Media

    As many of you know
    streaming audio or video.swf isn't possible
    with swish 2.01/ swishmax.

    SWF format while powerful isn't the only format
    available for streaming media nor is it the best
    in all circumstances.

    Being versatile is in many ways being practical

    Check out this alternative of using win media
    and swf.
    http://frets-files.com/html/modules/...php?storyid=74

    Frets

  2. #2
    Senior Member
    Join Date
    Jan 2003
    Location
    United States
    Posts
    892
    Hi Frets,

    I've downloaded your article, printed it and have read it several times. You've written a great article.

    I have a couple of questions:

    1. In the "Object Embed Code" section you have referenced a "dmc.swf" file on two occasions. Is this a typo and should read "dmc.wma"? or are you using a swf with the proceedure?

    2. In the "Object Embed Code" section you provided the:
    ID "MediaPlayer1" Width=400 height=410

    If i'm using this for streaming audio and don't want the pop up Windows Media Player windwo can I make those W&H dimensions to 0 or does WMP need a factor >0 in order to work?

    3. Just for clarification purposes.... if I use an ASX file it would be referenced in the "Object Embed Code" at both the Value = and the SRC= locations. Would the code look like this:

    SRC="http://www.yourdomain.com/song.asx" Is this right?

    4. In the last few lines of your article you mentioned that we could use, in SwishMax, the JavaScript function "PlaySong"..... how would you stop the song? Would you use the regular SwishMax "Stop Sound" or use another JavaScript function to do this?

    5. What software did you use to output the "Object Embed Code" or did you hand code it?

    6. Finally, your example is for streaming audio.... how would this work for video using the v2 codec. Would the quality be decent?


    Thanks again for a great article and for helping me with these answers.

    Blessings

    JWR
    When all is said and done -- "You MUST be Born Again!" John 3:3

  3. #3
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    a few answers

    your right I could have used .wma
    for the code but I also believe I mentioned that
    the windows media player can also play swf's

    (swf4,5 not swf6 or swf7)

    I hand coded it but it stems from
    early readings at msdn.
    They have changed the object embed to reflect wm9
    format.
    wm5 runs in everything.
    Which is why I chose that object embed.

    Yes you can resize the player by dimension
    dimensions are given

    <OBJECT ID="MediaPlayer1" width=400 height=410
    for ie and
    width=400 height=410
    for mozilla flavored

    I'm late
    I'll clarify the rest as time allows

    Mike

  4. #4
    Senior Member
    Join Date
    Jan 2003
    Location
    United States
    Posts
    892
    Frets,

    Thanks. Looking forward tohearing more.

    The WMP5 that plays in everything ... is that the same v2 codec that you suggested downloading in your article?

    Blessings

    JWR
    When all is said and done -- "You MUST be Born Again!" John 3:3

  5. #5
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    catch up time
    3. Just for clarification purposes.... if I use an ASX file it would be referenced in the "Object Embed Code" at both the Value = and the SRC= locations. Would the code look like this:

    SRC="http://www.yourdomain.com/song.asx" Is this right?
    Yes and in the embed portion and in the
    object portion
    Code:
    <PARAM NAME="FileName"VALUE="http://www.yourdomain.com/song.asx">
    4. In the last few lines of your article you mentioned that we could use, in SwishMax, the JavaScript function "PlaySong"..... how would you stop the song? Would you use the regular SwishMax "Stop Sound" or use another JavaScript function to do this?
    javascript is the answer
    the object embed is the identified object
    ergo if your object embed is named MediaPlayer1
    then your script would be
    MediaPlayer1.Stop()

    Each time the object is surrounded by an identifiable object
    you change it by . ergo if you have your windows media object
    inside a <div id = "myName">
    then you would need to identify the div
    myName.MediaPlayer1.Stop()
    Other common commands are
    MediaPlayer1.Rewind()
    MediaPlayer1.Play()

    These commands you can use directly in swish.

    Microsoft states that there are 100 different controllers
    in the object embed


    One thing to note about Stop() the movie is streaming
    so stop actually operates as a pause control.


    The javascript controls for the media player are not
    as versatile as the javascript controls on an swf but
    they do the trick.

    Because of the nature of the windows media object
    to load a new asx or wma, wmv, asf into the windows media
    object you would use setFileName as opposed to
    Load movie as you would via javascript to swf.

    One thing about my asx script.
    and I just noticed was some scripting issues
    all the asx tags were not present
    Now it is correct.
    http://frets-files.com/html/modules/...ryid=74&page=2

    5. What software did you use to output the "Object Embed Code" or did you hand code it?
    It started off very generically from msdn source code
    several years back.
    They have since removed a great deal of content about
    the windows media object, and scripting within the asf.

    I don't hand code as much as I used to but I do store a
    good script when I can fortunately my free soruce code html editor allows me to store/drag my scripts onto any page.
    Just because I'm a hand coder doesn't mean I remember everything.
    6. Finally, your example is for streaming audio.... how would this work for video using the v2 codec. Would the quality be decent?
    The V2 codec I list is only for audio and is a free plugin to a
    very popular free audio conversion tool.
    For video I suggest export to wmv5 or asf 5 simply because
    of the universal appeal issue. Not a lot happened in development
    between 5 and 7 as far as better quality less buffering.
    7~9 won't run on a mac in browser. Usually what happens is the
    visitor has to click on the link and if the windows media player
    is installed on a mac it will run standalone. 9 isn't supported
    by mac at all and it's not supported for ME or Win98.

    The major problem with video is finding older codecs


    I will admit that 9 has extremely wide dynamic range.
    at it's highest settings it surpasses CD and has a comparable
    value to DVD or extended CD qualtiy. the issue is you can't
    stream files unless the visitor has a large enough pipe
    (1.5 mps) there simply aren't enough people on cable broadband
    to support it. DSL is just to slow.

    The really interesting thing about win media.
    as we've talked about the object and the files.
    On thing not brought up is the server.
    If your host has an microsoft media server (they run on
    Unix/Linux and Win systems) Then you can use the mms://
    protocol. mms force feeds the file which means unlike
    http where transmission may drop off the stream is constant.
    Meaning those who are used to a 7kps download rate on files
    with a 56k modem can enjoy a fuller throttle 22 or 28kps constant
    stream. Meaning even less buffering higher quality steady stream
    between pings somewhat like an https connection.
    because of the nature of mms it can pass straight thru firewalls

    It makes for an inexpensive alternative to Flash Com servers
    and Real Media servers both with high prices and those prices are
    reflected in hosting costs.


    Frets

  6. #6
    Senior Member
    Join Date
    Jan 2003
    Location
    United States
    Posts
    892
    Frets,

    Thank you for your great answers. I have read them and pdfed them for further reference.

    Thanks again.

    Blessings

    JWR
    When all is said and done -- "You MUST be Born Again!" John 3:3

  7. #7
    Junior Member
    Join Date
    Sep 2002
    Posts
    3
    This seems pretty cool...

    Does anyone have a working example we can look at?

  8. #8
    Junior Member
    Join Date
    Jan 2004
    Posts
    12
    Could you please repost the link to your article? The link is dead now and I would really like to read it.

    tnx.

  9. #9
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    this is a very very old thread.
    Swishmax is capable of much much more then concievable in win media.
    Not to mention swishvideo.


    Along the way all mozilla browsers were left behind as well as mac, and *nix computers
    because of win media's proprietary stance on file types. None will run any newer win media (wm6+) naitively in browser. Windows pretty much killed a market for themselves when they initiated later technologies.

    If your streaming audio it's best to do so either loadsound() or insert soundtrack via swishmax. If your streaming video it's best to convert the .vid file to either flv or
    swf in swish video.

  10. #10
    Junior Member
    Join Date
    Jan 2004
    Posts
    12
    stupid me, I forgot to check the date :$

    Anyway, I hoped the article was about controlling an embedded windows media player in a html file with controlls made in flash. But I'll make a new post for that, tnx!

  11. #11
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    well like I said it won't work in newer mozilla flavored (netscape, firefox etc) browsers
    or in any os other then win xp 200 pro anymore.

    You won't be able to do a full implimentation of controls for the win media player
    play pause stop is about all you'll be able to do and even then it may not work easily with sp1

    Why not just stream with swish/flash?

  12. #12
    Junior Member
    Join Date
    Jan 2004
    Posts
    12
    We are now streaming with a flashcom server, but asia (global coverage) is an important factor for my client. Flash would be to costly since we would have to invest in our own servers for asia (there are practically no flashcom servers in (south east)asia.
    This is the site we're working on: www.travelstreams.com

  13. #13
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    You don't need a flashcom server to stream mp3 or streaming swfs.
    the only time a flashcomm server is required is when the content is broadcast.

    The content will stream but do so passively as opposed to forced.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center