Flash stream player (tutorial?) - actionscript

I'm working at a radio station in my free time. I host a radio show there and currently were building a new website for the show. There is a audio stream available but there's no flahs player or what so ever, so i decided to build one for the new website. I know a bit about flash, i can create animations etc but i have no knowledge about actionscript... Could someone tell me where i could find a tutorial about this stuff?
This is the content of the asx file from the stream (http://content.streamone.nl/livestream/ne48FnM3kp.asx) :
<ASX version = "3.0">
<Abstract>Served by StreamOne - Streaming Media Platform</Abstract>
<Title>Seaport FM</Title>
<Author>NA</Author>
<Copyright>Copyright</Copyright>
<Param NAME="Prebuffer" Value="True" />
<Entry>
<Ref href="http://icecast.streamone.nl/ne48FnM3kp" />
<Title>Seaport FM</Title>
<Author>NA</Author>
<Copyright>Copyright</Copyright>
<Abstract></Abstract>
</Entry>
</ASX>
I have searched on google etc but i cant find anything i can understand
Greetz, rutgerinc

two simple examples.
and reference: flash.media.Video, flash.net.NetConnection and flash.net.NetStream

Related

How to display pdf in a WebView in terms of UI and UX - iOS Swift

Brief about the app: The app parses html documents and load it in the app as a web view.
In the iOS app I like to show PDF files. There is a structure XML that would contain the whole structure.
Case 1: For a simple PDF file it would look like the following in the structure.xml
<node id="Nc13d37aa" node_id="82cd790d-e5f0-4ee6-a26c-a6e400af8541" type="publication" default="TEST_Pub" secured="false">
<language name="en-GB" path="X-BIKE-401/en-GB/publications/TEST_Pub-003.00.pdf">
<title>(Test-)Publication</title>
</language>
</node>
Case 2: In a more complex scenario one publication might contain a so called ATI's(Additional technical information) This would look like this:
<node id="Nd747c4dc" node_id="b4528fb8-c615-4b96-945d-a5af009325f2" type="publication" default="TEST_Pub_ATI" secured="false">
<language name="en-GB" path="X-BIKE-401/en-GB/publications/TEST_Pub_ATI-003.00.pdf">
<title>(Test-)Publication with ATI</title>
<atis>
<ati id="ati584a41ee" internal_id="af720ef4-5238-4fb4-ba8b-a5ae00debfae" code="Test_ATI" type="Service Letter" required="false" issuecode="Test_ATI_03" issuenumber="3" revisionnumber="0" href="X-BIKE-401\en-GB\ati\Test_ATI-003.00.pdf">(Test-)ATI</ati>
</atis>
</language>
</node>
The idea here is, that we have additional legacy documents accompanying a legacy publication. The idea here would be, that we show the normal legacy publication, but have an additional area in the view, that indicates the user, that there ARE ATIs, and a way for him to view the ATIs - but also get back to the original publication. An ATI is usually some information
Case 3: There is also the case, that one or many ATIs are mandatory.
This means, that the user needs to read & confirm those first, before he can read the actual publication. This will be like:
<node id="N5a3c00f" node_id="09fe8d7b-a95d-4da8-bf06-a5af00933ddc" type="publication" default="TEST_Pub_mATI" secured="false">
<language name="en-GB" path="X-BIKE-401/en-GB/publications/TEST_Pub_mATI-003.00.pdf">
<title>(Test-)Publication with MANDATORY ATI</title>
<atis>
<ati id="ati35c8ee0e" internal_id="60dfaa70-f017-44ea-9190-a5ae00df2494" code="Test_ATI_MAND1" type="Service Bulletin" required="true" issuecode="Test_mATI_03" issuenumber="3" revisionnumber="0" href="X-BIKE-401\en-GB\ati\Test_ATI_MAND1-003.00.pdf">(Test-)ATI1 (MANDATORY)</ati>
<ati id="atic771b1b6" internal_id="d1cffa4b-b1be-4bbb-8dc0-a743010cf246" code="Test_ATI_MAND2" type="Service Bulletin" required="true" issuecode="Test_mATI2_01" issuenumber="1" revisionnumber="0" href="X-BIKE-401\en-GB\ati\Test_ATI_MAND2-001.00.pdf">(Test-)ATI2 (MANDATORY)</ati>
</atis>
</language>
</node>
You can see, that two have the #required set to "true".
In this case we need to first show the first ATI, request the user to "confirm" somewhere that he read it. move on to the next required ATI and conform this as well. and once he has confirmed all the ATIs, he can view the publication itself.
Still he needs to be able to reopen the ATIs (similar to the previous point) and look them up again - without confirmation again.
The user needs to reconfirm, once the publication is closed.
Question: For case 2 & 3, how would this might look like? a mockup of it how would it be? Ideally a proposed solution best in terms of UI and UX.
I can suggest you this way , it may solve your question :
CASE 1 :
Simply Take a UIWebView and show PDF url link , then WebView will render it perfectly .
CASE 2 :
In case 2 you are first showing the case 1 where you show simple PDF and showing it by rendering the web view but then this PDF has extra information called ATI that we need to show this somehow on the web view. So for example a button that when you click on it it will show the extra information maybe in a pop up and then there should be a navigation back to the original PDF
CASE 3:
Use some Image Flipper library to show multiple pdf doc in which you can show some sort of info to acknowledge the user about there are more than one doc is there for navigation .
For Flipper follow this library : https://cocoapods.org/pods/DJKFlipper
Thanks.

Opening a Word document at a particular bookmark

Using MVC 5 Razor Views.
I currently have a link to open a document that sits on the server in my about view as follows........
Basic Training <img src="~/Content/Images/Word.jpg" height="24" width="24" />
What I'd like is to be able to have a link to open this document at a particluar bookmark.
From what I have read so far, it would seem that the bookmark is specified after a # symbol. Unfortunately it doesn't seem to work and the document just opens from the start.
I've tried opening via an action using the #' notation as werll, but as yet, no joy.
FileStream fs = new FileStream(Server.MapPath(#"~\Content\My Doc - Basic Training.docx"), FileMode.OpenOrCreate, FileAccess.ReadWrite);
return File(fs, "My Doc - Basic Training.docx");
I've simply been appending #BoomarkName to the filename. No joy as of yet.
Is it possible?
If so could someone please point me in the right direction.
Just seems to work with #bookmark_name, as explained in How to create a hyperlink from an HTML page to a bookmark in Word.
So:
Basic Training <img src="~/Content/Images/Word.jpg" height="24" width="24" />

URL Rewrite 2.0 not excluding subfolder

Could someone please help me to solve my problem?
I'm using ASPX files on IIS 7.5 and URL-Rewrite 2.0 to get SSL in any access condition:
www.somedomain.com -> https://www.somedomain.com
www.somedomain.com/mypage.aspx -> https://www.somedomain.com/mypage.aspx
It's functioning perfectly. BUT, since the page loads/plays some MP3/OGG files, I had noticed that:
1- if the page is executed in SSL, the MP3 does not play in some devices (Androids/iPhone/iPad mobile devices);
2- if the page is executed WITHOUT SSL, it occurrs normally, 100%.
So, I had tried to filter the MP3/OGG files (and also, PNG/JPG images) in URL-REWRITE to avoid their access under SSL.
My filter is:
<add input="{REQUEST_URI}" pattern="(png|jpg|mp3|ogg)" negate="true" />
<add input="{HTTPS}" pattern="^OFF$" />
I had tried a lot of filter settings on these files, as {REQUEST_URI}, {URL}, {UNENCODED_URL} and I see that all of them are ineffective to avoid these files under SSL. I see this using MICROSOFT NETWORK MONITOR, that shows all files being loaded in port 443 (HTTPS). Another characteristic is the fact of I never see the original filenames there (the MP3 files and images). It seems everything is under SSL settings. Another one is the fact of the MP3 does not play in SSL access and the images delay some seconds to load.
I CANNOT utilize the whole domain/folder name (like www.mydomain.com/songs/music.MP3) since I'm using JPLAYER 2.0 and I cannot set this library with the entire MP3 address (the song does not play!), but just the subfolder where they remain, like below (see mp3 and ogg tags):
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
mp3:"audio/" + theSongs[0] + ".mp3",
ogg:"audio/" + theSongs[0] + ".ogg"
});
},
play: function () { // To avoid both jPlayers playing together.
$(this).jPlayer("pauseOthers");
},
swfPath: "Scripts/jPlayer/",
supplied: "mp3, ogg",
volume: 0.25,
cssSelectorAncestor: "#jp_container_1",
wmode: "window"
});
How to avoid this kind of behavior? I wouldn't like to put these files (MP3, OGG, JPG, PNG) in another domain to avoid URL-REWRITE to catch them. I need them in the same main project and within one of its subfolder (audio and images folders).
How to create an inbound rule to REALLY discard completely these files?
Note: if I utilize as a rule something like
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
it doesn't play (or loads) too.
I would appreciate a lot your efforts to help me in solving that problem.
Kind regards,
David

Stream video from website, and support modern browsers (incl. IE) *and* iPad

My boss wants the following:
Requirements: Stream m4v videos from our Web-server to clients including standard web browsers (IE7, FF, Chrome, etc) and iPad!
I'm not really sure why he wants m4v...he mentioned efficiency but it may also have to do with iPad compatibility?? Anyway, I'm stuck with m4v.
I've browsed some related questions on SO, and this page is very useful as well:
http://henriksjokvist.net/archive/2009/2/using-the-html5-video-tag-with-a-flash-fallback
So if I understand correctly, HTML5 with <video> tag will take care of all my requirements (browsers & iPad) except IE up to and including IE8.
So in my code:
<div id="demo-video-flash">
<video id="demo-video" poster="snapshot.jpg" controls>
<source src="video.m4v" type="video/mp4" /> <!-- MPEG4 for Safari -->
<source src="video.ogg" type="video/ogg" /> <!-- Ogg Theora for Firefox 3.1b2 -->
</video>
</div>
<script type="text/javascript">
$(document).ready(function() { // ... a dash of jQuery.
var v = document.createElement("video"); // Are we dealing with a browser that supports <video>?
if ( !v.play ) { // If no, use Flash.
var params = {
allowfullscreen: "true",
allowscriptaccess: "always"
};
var flashvars = {
file: "video.f4v",
image: "snapshot.jpg"
};
swfobject.embedSWF("player.swf", "demo-video-flash", "480", "272", "9.0.0", "expressInstall.swf", flashvars, params);
}
});
</script>
As the link above explains, test if the browser supports <video>, and if not, fall back to flash. If the browser supports <video>, I don't need to worry about the player as the browser handles that. If it doesn't support <video>, I need to provide:
(a) A flash player.
(b) A flash-compatible copy of my .m4v video
Questions:
1) Will this solution work for my requirements?
2) Is .m4v a good format to stream to iPad? (I'm guessing yes as it's an Apple proprietary format!)
3) Is .m4v "flash-comatabile"? That is, if I send it to my flash player will it work? I've read conflicting reports on this. If it's not, then I guess I need to have a copy of my video converted to a flash-compatable format...any recommendations? (.f4v seems common but we already have a .mov file will that work?)
4) Last but not least, what's a good flash player. I'm leaning toward flowplayer (http://flowplayer.org/), however, we already have a swf player installed (http://code.google.com/p/swfobject/). Seems this latter one would work...any advantages to one or the other??
Apologies if some parts of this question don't make sense...there's alot of info about video out there and it's hard to piece it all together...hoping some answers here may help. I can refine my question as needed.
Thanks in advance!
Peter
As far as I know..., IE does not support HTML5 so the tag would be unrecognized in IE...

Display flash player in place of URL

Yahoo IM has a neat trick. If you post a URL link to a youtube video, it displays in it's place a flash player with that url's video loaded.
I would like to do the same for my Delphi(7) based chat room (www.magchat.com). The display component is TRichView.
I've scoured Google and sent numerous emails without any success... anyone have any suggestions?
The effect I am trying to achieve is when a User posts a URL link to youtube in the chat program... main form using the TRichView Component... the program would spawn a flash player instead of the url, with the movie playing from the url link. I don't have any idea how to amake this happen, but as I said, I've seen this done in Yahoo's IM program, so it's apparently possible.
There isn't any way to embed twebbrowser in the TRichView Component that I am aware of. I was assuming this would have to be some sort of flash player called when the url is detected. The TRichView Component does support flash.
I hope that's clear. I'm not sure my initial questions was completely clear.
Thanks in advance,
Mark Gundy
www.magchat.com
Whenever you see a http://www.youtube.com/watch URL with a v parameter, just include the following HTML snippet:
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/[video-id]&hl=en&fs=1&">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/[video-id]&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344">
</embed>
</object>
replacing each occurrence of [video-id] with the v parameter from the URL.
The above HTML snippet is just the "Embed" code taken straight from the page for a random YouTube video. You can tweak some of the parameters like the size, etc.
TRichView already knows how to display HTML, right? You shouldn't need to embed a TWebBrowser in it. So can't you insert the HTML that Laurence's answer demonstrates? You said the component supports Flash, after all.
If it turns out TRichView doesn't support Flash, then try embedding it as a Delphi control, instead. You already asked how to do that. TRichView says it knows how to insert Delphi controls, so import the Flash ActiveX player into Delphi; that will define a Delphi component, which you should be able to put onto the TRichView.
To be able to embed a youtube video in a Delphi win32 app you need to wrap the flash activeX control into a component, so Watch this video.
To display the video just set the movie property of the TShockWaveFlash component. If your url is http://www.youtube.com/watch?v=oGeCqRfRAcQ - convert this to http://www.youtube.com/v/oGeCqRfRAcQ&hl=en&fs=1
It seems to take awhile for the video to become available, and doesn't seem to work the first time I run the application, no idea why, but I'll let you solve that one (it's the first time I've tried this).
You might also want to look into oEmbed. It's a standard way to request the embedded version of a media file so you don't have to do any of the search/replace recommended by other users. Here's a YouTube example:
You have a YouTube URL:
http://youtube.com/watch?v=M3r2XDceM6A
You make a request to YouTube's oEmbed endpoint to get the embed code:
http://www.youtube.com/we/love/oembed/?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json
And they return a JSON response that includes an HTML snippet:
{
"version": "1.0",
"type": "video",
"provider_name": "YouTube",
"provider_url": "http://youtube.com/",
"width": 425,
"height": 355,
"title": "Amazing Nintendo Facts",
"html":
"<object width=\"425\" height=\"355\">
<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&hl=en\"></param>
<param name=\"wmode\" value=\"transparent\"></param>
<embed src=\"http://www.youtube.com/v/M3r2XDceM6A&hl=en\" type=\"application/x-shockwave-flash\"
wmode=\"transparent\" width=\"425\" height=\"355\"></embed>
</object>",
}
oEmbed is also supported by many other websites: Flickr, Viddler, Qik, Hulu, Vimeo, etc.

Resources