A question related to single sign on.
Can I pass username/password to Strobe playback as parameters so user doesn't need to be prompted for username/password for protected content? In other words, Strobe detects the need for authentication, but instead putting up a dialog box to prompt the user, it just extracts the passed in username/password and passes it along to the license server?
If no such feature is available, can someone point to a simple plug-in sample, where I can pass along username/password or a token to the license server, perhaps through the connection or stream object? I have looked at the Akamai example and it is fairly complicated with little documentation.
Thank you for your help in advance.
Curious, why would you want to pass the default user/pass to authentication? Doesn't that mean you wouldn't need the auth at all? If so, wouldn't it be an option to use anonymouse encrypted content instead?
One way to do this would be possibly to overwrite the Auth dialog with the fault text in it when DRMState. AUTHENITCATION_NEEDED.
Does our suggestion require changing the osmf code or the Strobe playback code? I am hoping to accomplish this in the most non-intrusive way, like a plug-in.
Thank you so much for your suggestion and looking forward to more recommendations.
If SMP allows overwriting "auth dialog", then I think you can write a plugin to do so in SMP level. For that matter, Andrian would be a good person to talk to.
Doing this in OSMF to use it in SMP wouldn't seem to be a way to do so, although there is a way to do it, something like below.
In MediaPlayer level, there is "authenticated" function that passes username and password, and "authenticated with token".
Also drmState should tell you what state of your encrypted media is.
In your plugin, listens to DRMEvent . If DRMState is AUTHENTICATION_NEEDED, Pop up your auth dialog with your user/pass login.
private function onTraitAdd(event:MediaElementEvent):void
_contentProtectionTrait = mediaPlayer.media.getTrait(MediaTraitType.DRM) as DRMTrait;
private function onDRMStateChange(event:DRMEvent):void
var drmState:String = event.drmState.toString();
var authDialog:AuthDialog = new AuthDialog();
authDialog.drmTrait = _contentProtectionTrait;
authDialog.metadata = event.target.drmMetadata as DRMContentData;
In your dialog, use authenticate(username, password) when a user tries to attempt auth. something like this.
private function attemptAuth(event:MouseEvent):void
It is possible to create a plugin for this too. I created a sample plugin for to get started. Take the source code from here:
http://smpfmp.appspot.com/SingleSignOnPlugin.zip (I'll commit the code either to the OSMF or the SMP code repository later).
For testing you need to:
1. point the URL to an encrypted content
2. instruct FMP/SMP to load the plugin
3 & 4. set the username and password as plugin metadata
Under the hood, the plugin will read the metadata, it will block the DRMTrait and will do the authentication itself. The player will not be aware that a DRM trait is avaiable at all, so it will not display the Auth Dialog.
Looking forward to your reply,
Thank you so much for providing the SSO plug-in and it worked as a charm.
A follow-on question is how I can use SSO plug-in and SMIL plug-in together? For example, I want to play
a playlist of videos and use the SSO plug-in to bypass challenging username/password? I would like to
pass the usernmae/password through SSO plug-in parameters? Is that possible and how we need to
modify the SSO plug-in?
Thanks so much for tremendous help.
If multiple videos in a SMIL SEQuence require exactly the same username and password, the plugin should work as it is.
If this is broken, you need to trace inside the plugin and see what goes wrong (I suspect I didn't clean-up properly an event handler or over-cleaned them).
If you have a SMIL asset available it should be easy for you to trace this. Currently I'm heads down working on the new StrobeMediaPlayback features and won't be able to look at this during the next 3 weeks.
Let me know if you encounter any issues troubleshooting this.
When I support both plug-ins as the following,
It seems like the single sign-on plug-in is ignored and I am being prompted for username/password again. Is there an easy way for me to trace where the problem is?
BTW, I can compile Strobe logically with the ANT script and thanks for your help on this one as well.
The SMILPlugin seems to have a bug when used together with a proxy plugin.
Please follow these steps:
1. Check-out the SMILPlugin source code: http://opensource.adobe.com/svn/opensource/osmf/trunk/plugins/samples/ SMILPlugin
2. Open the SMILMediaGenerator class.
3. Go to line 123. You should see the following snippet:
if (!isNaN(duration) && duration > 0)
(videoElement as VideoElement).defaultDuration = duration;
4. Replace it with this snippet:
if (!isNaN(duration) && duration > 0)
// Assuming that videoElement is a VideoElement is wrong (I suppose we can find a better name for this variable?)
// since any proxy plugin will break this code. Iterating through the proxy chain until we get to a VideoElement
// We can add some deffensive code just after the while iterator, unless we should always have a VideoElement on top.
var temp:MediaElement = videoElement;
while (temp is ProxyElement)
temp = (temp as ProxyElement).proxiedElement;
(temp as VideoElement).defaultDuration = duration;
5. Check that everything works with this patch.
6. Let us know if this fixes the current issue.
7. Log the bug and submit the patch (with a link to this forum post) here: http://bugs.adobe.com/jira/browse/FM
Message was edited by: Andrian Cucu updated the snipet so that is uses a temp var
Thanks Andrian for digging int this!
Yes, Lei please make sure to file this to Jira. We are aware of some glitches in some of plugins when they are used with other plugins and we want to get this to the bottom of it for sure. Please detail out as much as you can, and add enhancement request based on some of your exprience of using plugins in general if any.
I will give it a try as soon as I receive my extension on our certificate. Our certificate expired yesterday and nothing really works for me at this point.
I will follow up with a Jira request when I finish testing.
I successfully tested your fix for SMIL plug-in with SSO plug-in and everything works like a charm!
Filed a buy here,
I noticed a minor issue with duration flag for the SMIL file,
If I list the video entry as the following,
<video id="b541780b-732a-42af-bf4c-1627255cf356" src="http://localhost/media/dhttp/monster.f4m"/>
and the video plays.
But when I add duration flag and the player won't play,
<video id="b541780b-732a-42af-bf4c-1627255cf356" src="http://localhost/media/dhttp/monster.f4m" dur="30s"/>
Can you take a look at it?
For now, I am all set.
Thanks again for your help.
I've just checked in a fix for this into the trunk of the OSMF SVN repository if you'd like to try it out.
Info here if you are not familar with the repository:
I am Beginner to this field and don't know much.
I have few questions.
1> How i would be able to use authentication dialog box username and password in strobe media playback.
2> How i would be able to add logo image to my video running in strobe media playback. I mean where do i need to make changes to strobe media playbacksource code.
Suggest some good resource for as3.
Will be waiting for your favorable response.
Please help me out.
Thanks and Regards
Europe, Middle East and Africa