Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-23-2012, 07:09 PM   #1
zz2111
Registered User
 
Join Date: Mar 2012
Posts: 2
Red face Use DisplayObject in flash.media.Video

Hi there, I am working on a project where I would like to use an externally retrieved DisplayObject instance as a flash.media.Video instance. The DisplayObject is a Flash wrapper of a streaming video that provides a set of API calls to interact with the video. But I don't have access to the internal video object itself nor to the netStream/netConnection property of the video. Is it possible at all to somehow use the DisplayObject as a flash.media.Video? Thanks a lot!
zz2111 is offline   Reply With Quote
Old 03-23-2012, 07:20 PM   #2
wvxvw
Holosuit User
 
wvxvw's Avatar
 
Join Date: Oct 2006
Location: Tel Aviv
Posts: 4,301
Send a message via ICQ to wvxvw
Default

Video inherits from DisplayObject, so, in other words, it is DisplayObject. But you cannot use just any DisplayObject to display video, you need it to inherit from Video. I don't think I understood the rest of the question though: why do you want to use an object that doesn't allow you to [attach / detach video stream?] to it to play video instead of another object that would do it?
__________________
The .NET open source editor for Flash and web developers
*This would be my contribution to the project*
couchsurfing if you need it
wvxvw is offline   Reply With Quote
Old 03-23-2012, 07:34 PM   #3
zz2111
Registered User
 
Join Date: Mar 2012
Posts: 2
Default

The scenario is in my project I have to play Youtube videos that are retrieved through the Youtube Flash API. All Youtube videos are wrapped in a DisplayObject that due to their TOS I cannot crack into. So I have to use the DisplayObject as it is through the public methods it provides.

On the other hand, we are using a commercial Flash player to play our other videos stored in Amazon Cloudfront. We want to use the consistent interface on these Youtube videos too. And the Flash player we have uses a subclass of flash.media.Video. Unfortunately this Flash player can't use the Youtube DisplayObject directly (Error #1034: type conversion failed). So I wonder if there is something that I missed.

Hope this clarifies better my intentions. If you have any suggestions please do post to me. Thanks a lot!

Quote:
Originally Posted by wvxvw View Post
Video inherits from DisplayObject, so, in other words, it is DisplayObject. But you cannot use just any DisplayObject to display video, you need it to inherit from Video. I don't think I understood the rest of the question though: why do you want to use an object that doesn't allow you to [attach / detach video stream?] to it to play video instead of another object that would do it?

Last edited by zz2111; 03-23-2012 at 07:37 PM.
zz2111 is offline   Reply With Quote
Old 03-23-2012, 08:46 PM   #4
wvxvw
Holosuit User
 
wvxvw's Avatar
 
Join Date: Oct 2006
Location: Tel Aviv
Posts: 4,301
Send a message via ICQ to wvxvw
Default

Although it's not impossible to substitute YouTube video player for something else to play YouTube videos, this will probably violate the terms of service. So this isn't really a programming related question.
So, probably, the answer is "no, you can't" because of the legal limitations.

I'm still not certain about the techical aspects of what you were trying to achieve, but probably it's not important as there's no way to do it anyway. I would imagine that YouTube video player is some kind of DisplayObject and trying to "play" it as if it was video is roughtly as trying to play a television, instead of playing a movie.
__________________
The .NET open source editor for Flash and web developers
*This would be my contribution to the project*
couchsurfing if you need it
wvxvw is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:23 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.