Skip to content

Commit

Permalink
(ios): rm audio overlay on vid view (#142)
Browse files Browse the repository at this point in the history
increment version
  • Loading branch information
shamilovtim authored Jul 2, 2018
1 parent 836502a commit 89d62d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-streaming-media",
"version": "2.1.1",
"version": "2.1.2",
"description": "This plugin allows you to stream audio and video in a fullscreen, native player on iOS and Android.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-streaming-media"
version="2.1.1">
version="2.1.2">

<name>StreamingMedia</name>

Expand Down
16 changes: 10 additions & 6 deletions src/ios/StreamingMedia.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ @implementation StreamingMedia {
UIImageView *imageView;
BOOL initFullscreen;
NSString *mOrientation;
NSString *videoType;
}

NSString * const TYPE_VIDEO = @"VIDEO";
Expand Down Expand Up @@ -52,6 +53,8 @@ -(void)parseOptions:(NSDictionary *)options type:(NSString *) type {
}

if ([type isEqualToString:TYPE_AUDIO]) {
videoType = TYPE_AUDIO;

// bgImage
// bgImageScale
if (![options isKindOfClass:[NSNull class]] && [options objectForKey:@"bgImage"]) {
Expand Down Expand Up @@ -214,13 +217,14 @@ -(void)startPlayer:(NSString*)uri {
name:AVPlayerItemFailedToPlayToEndTimeNotification
object:moviePlayer.player.currentItem];


if (imageView != nil) {
[moviePlayer.contentOverlayView setAutoresizesSubviews:YES];
[moviePlayer.contentOverlayView addSubview:imageView];
if ([videoType isEqualToString:TYPE_AUDIO]) {
if (imageView != nil) {
[moviePlayer.contentOverlayView setAutoresizesSubviews:YES];
[moviePlayer.contentOverlayView addSubview:imageView];
}
moviePlayer.contentOverlayView.backgroundColor = backgroundColor;
[self.viewController.view addSubview:moviePlayer.view];
}
moviePlayer.contentOverlayView.backgroundColor = backgroundColor;
[self.viewController.view addSubview:moviePlayer.view];

// Listen for click on the "Done" button

Expand Down

0 comments on commit 89d62d0

Please sign in to comment.