Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set fps for renditionchange events #226

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
#import "MUXSDKPlayerBindingConstants.h"

#if __has_feature(modules)
@import AVFoundation;
@import Foundation;
@import CoreMedia;
#else
#import <AVFoundation/AVFoundation.h>
#import <Foundation/Foundation.h>
#import <CoreMedia/CoreMedia.h>
#endif
Expand Down Expand Up @@ -619,6 +621,16 @@ - (MUXSDKPlayerData *)getPlayerData {
[playerData setPlayerWidth:[NSNumber numberWithInt:viewBounds.size.width]];
[playerData setPlayerHeight:[NSNumber numberWithInt:viewBounds.size.height]];

for (AVAssetTrack *track in _player.currentItem.tracks) {

if (track.mediaType == AVMediaTypeVideo) {
// TODO: expose player data property for FPS

NSLog(@"%f", track.nominalFrameRate);
}

}

CGRect screenBounds = [[UIScreen mainScreen] bounds];
// TODO: setPlayerIsFullscreen - should be a boolean.
if ((viewBounds.size.width == screenBounds.size.width && viewBounds.size.height == screenBounds.size.height) ||
Expand Down
Loading