1

I'm a C# developer completely new to Flash but am attempting to stream a file from Akamai's HD Network using their HD Flash 1.0 configuration.

I have "imported" the video already deployed on the Akamai network, but it seems there is a step where I have to somehow leverage an SWC component to actually make the connection to Akamai work properly.

The docs provided are all using what appears to be a much older version of Flash and don't include an FLA file. However, part of their docs do make it sound trivial to someone more versed in Flash:

Akamai HDNetwork v1.0 - HTTP delivery of FLV files, compatible with Flash player 10.0 (we call it HDN1 for short) - combine a base NetConnection connected to "null" with a com.akamai.hd.HDNetStream. Follow the samples inside the samples\HDN1.0 folder to find out how to do basic live playback, basic VOD, multi-bitrate playback, manual switching, sub-clips, and token authentication.

And also:

com.akamai.hd.HDNetStream— is used for HD Flash 1.0 Streaming

I placed the SWC file in the same folder as the FLA I'm working in, and included this code in the Actions window:

import flash.net.NetConnection;
import com.akamai.hd.HDEvent;
import com.akamai.hd.HDNetStream;

trace("Hi!");

// Magic happens here 

.. but I just get compilation errors that the import definitions can't be found. So...not off to a good start.

All I want to do is stream the video - no multi-bitrate configurations or anything crazy - just how to get videos playing using our own SWF files. Does anyone know the easiest way to get up and running with this?

Brandon Linton
  • 4,373
  • 5
  • 42
  • 63
  • 2
    You need to add the SWC to the project using the menus in Flash Professional or Flash Builder, basically you need to find the project properties for your particular IDE and add the SWC http://forums.adobe.com/thread/879050 the compiler doesn't use the current directory to include things like other compilers might. Insofar as the question I don't think simple and streaming belong in the same sentence, and don't have an answer let along a concise one, but this will resolve your immediate issue. – shaunhusain Jul 05 '13 at 20:05
  • @shaunhusain that actually helped get me past the compiler error on import - I had been in the ActionScript settings before but didn't realize the difference between the source path and the library path tabs. Adding a library path to the SWC files fixed that part of it. – Brandon Linton Jul 05 '13 at 20:59
  • @shaunhusain do you know a good resource for understanding the Actions window and how one might attempt Akamai's guidance on setting up the NetConnection? Is the player itself something that can be subclassed directly to manipulate how it streams content? – Brandon Linton Jul 05 '13 at 21:01
  • sorry I don't know of any particularly good resources for that, would just Google around a bit. I'm an ex-Flex developer so I did AS3 in the Flex/FlashBuilder tool but never worked much with the regular Flash IDE (in part because I don't like the duality of doing things using the editor and in code, I prefer to stay in code). That said I know you can set the class for a library object in Flash and sort of have a 1:1 between your instances and the class instead of relying on actions executed/placed on the timeline. – shaunhusain Jul 05 '13 at 22:54

0 Answers0