问题描述:

I am developing an app for iOS and I can reproduce DRM encrypted videos, using the WideVine classic protocol and using the libWViPhoneAPI.a library from WideVine (a Google company).

I have also included the functionality of showing the subtitles following the same logic as in the project “WV-DemoPlayer” provided by WideVine; that is, using suitable callbacks I can get the strings related to subtitles and then I can set them into an UILabel which shows the subtitles over the video.

The problem appears when a user presses the button to “enlarge” the video; that is, in this case I can receive the strings related to the subtitles from a callback, but the process of enlarging the video “hides” the corresponding "subtitles UILabel" (this label has been put over the corresponding "video view" and its “layer.zPosition” has been set to an integer higher than 0). I have also realised that the same problems appears when we execute the “WV-DemoPlayer” project, which is a project provided by WideVine as example, although I have modified the URL to point to my Web Site in order to provide the DRM films).

The format of those DRM films are:

1) MyEncryptedFilm.wvm for the encrypted film

2) subs.xml which contains the subtitles

3) MyEncryptedFilm.smil (this is a xml file which contains the path for the MyEncryptedFilm.wvm and subs.xml).

That is, the content of MyEncryptedFilm.smil is:

<?xml version="1.0" encoding="UTF-8"?>

<smil>

<head>

</head>

<body>

<par>

<video src="http://10.18.4.16/MyEncryptedFile.wvm"/>

<switch>

<textstream src="http://10.18.4.16/subs.xml" systemLanguage="en"/>

</switch>

</par>

</body>

</smil>

On the other hand, my web server has a simple web page whose entry is:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>MyWebPage - Index</title>

</head>

<body>

<p>Film classic<a href="wvplay://10.18.4.16/MyEncryptedFilm.smil">My Film</a> </p>

</body>

</html>

So, I could managed to see the subtitles creating an UILabel an putting it over the video player (zPosition bigger than one). However, when I press the "enlarge" button I detect the notification "MPMoviePlayerDidEnterFullscreenNotification" and then I try to add, by code, a new UILabel over the videoplayer; that is:

-(void) didEnterFullScreen:(NSNotification *) notification {

NSLog(@"Received size enter full screen notification: %@", [notification name]);

[self.view insertSubview:self.subtitleView_ aboveSubview:self.movieHolder];

self.movieHolder.layer.zPosition = 0;

self.subtitleLabel_.layer.zPosition = 100;

}

But the result is that the subtitles label is not shown over the video player in full screen.

I suspect that there are other methods to integrate the subtitles in full screen mode, because, in full screen mode, I can see another icon in the toolbar of the video player which, when pressed, shows a menu whose title is "Audio & Subtitles", but I do not know how to setup this menu.

Thanks in advance.

相关阅读:
Top