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

NR-304039: absorb title from AVPlayer metadata #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion NRAVPlayerTracker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NRAVPlayerTracker'
s.version = '2.0.2'
s.version = '2.1.0'
s.summary = 'New Relic Video Agent, AVPlayer Tracker.'

# This description is used to generate tags and improve search results.
Expand Down
18 changes: 17 additions & 1 deletion NRAVPlayerTracker/NRAVPlayerTracker/Tracker/NRTrackerAVPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ - (NSString *)getTrackerName {
}

- (NSString *)getTrackerVersion {
return @"2.0.2";
return @"2.1.0";
}

- (NSString *)getPlayerVersion {
Expand Down Expand Up @@ -432,6 +432,22 @@ - (NSString *)getSrc {
return [[(AVURLAsset *)currentPlayerAsset URL] absoluteString];
}

- (NSString *)getTitle {
NSString *contentTitle = @"unknown";
AVPlayerItem *currentItem = self.playerInstance.currentItem;

if (currentItem != nil && [currentItem.asset isKindOfClass:[AVURLAsset class]]) {
NSArray<AVMetadataItem *> *metadata = [currentItem.asset commonMetadata];
for (AVMetadataItem *item in metadata) {
if ([item.commonKey isEqualToString:AVMetadataCommonKeyTitle]) {
contentTitle = (NSString *)item.value;
}
}
}

return contentTitle;
}

- (NSNumber *)getPlayrate {
return @(self.playerInstance.rate);
}
Expand Down
2 changes: 1 addition & 1 deletion NRIMATracker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NRIMATracker'
s.version = '2.0.2'
s.version = '2.1.0'
s.summary = 'New Relic Video Agent, Google IMA Ads Tracker.'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion NRIMATracker/NRIMATracker/Tracker/NRTrackerIMA.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ - (NSString *)getTrackerName {
}

- (NSString *)getTrackerVersion {
return @"2.0.2";
return @"2.1.0";
}

- (NSNumber *)getPlayhead {
Expand Down
2 changes: 1 addition & 1 deletion NewRelicVideoCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NewRelicVideoCore'
s.version = '2.0.2'
s.version = '2.1.0'
s.summary = 'New Relic Video Agent, Core.'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion NewRelicVideoCore/NewRelicVideoCore/NRVideoDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef NRVideoDefs_h
#define NRVideoDefs_h

#define NRVIDEO_CORE_VERSION @"2.0.2"
#define NRVIDEO_CORE_VERSION @"2.1.0"

#define NR_VIDEO_EVENT @"MobileVideo"

Expand Down