Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <Foundation/Foundation.h>
#import <AgoraMediaPlayer/AgoraMediaPlayerKit.h>
#import <AgoraRtcEngineKit/AgoraRtcEngineKit.h>
#import <AgoraRtcKit/AgoraRtcEngineKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol AgoraRtcChannelPublishHelperDelegate <NSObject>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

#import "AgoraRtcChannelPublishHelper.h"
#import <AgoraRtcEngineKit/IAgoraRtcEngine.h>
#import <AgoraRtcEngineKit/IAgoraMediaEngine.h>
#import <AgoraRtcKit/IAgoraRtcEngine.h>
#import <AgoraRtcKit/IAgoraMediaEngine.h>
#import "AudioCircularBuffer.h"
#import "scoped_ptr.h"
#import <mutex>
Expand Down Expand Up @@ -361,6 +361,15 @@ - (void)shouldStop {

}

- (AgoraVideoCaptureType)captureType {
return AgoraVideoCaptureTypeCamera;
}


- (AgoraVideoContentHint)contentHint {
return AgoraVideoContentHintNone;
}

/// Description of state of Mediaplayer's state
/// @param playerKit AgoraMediaPlayer
/// @param state AgoraMediaPlayerState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
6751F24524F655230013D341 /* AgoraRtcKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6751F24324F6551F0013D341 /* AgoraRtcKit.framework */; };
6751F24624F655230013D341 /* AgoraRtcKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6751F24324F6551F0013D341 /* AgoraRtcKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
6751F24924F6554A0013D341 /* AgoraRtcKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6751F24724F655360013D341 /* AgoraRtcKit.framework */; };
6751F24A24F6554A0013D341 /* AgoraRtcKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6751F24724F655360013D341 /* AgoraRtcKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8B1D6DF424D1789A0061E782 /* AgoraMediaPlayer.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8B34A1A5240D501E0043E21B /* AgoraMediaPlayer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8B2EE9A02394B5A9009FD6DD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2EE99F2394B5A9009FD6DD /* AppDelegate.m */; };
8B2EE9A32394B5AA009FD6DD /* ViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8B2EE9A22394B5AA009FD6DD /* ViewController.mm */; };
Expand All @@ -20,9 +24,7 @@
8B34A1A3240D4FEE0043E21B /* AudioCircularBuffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B34A195240D4FEE0043E21B /* AudioCircularBuffer.cc */; };
8B34A1A4240D4FEE0043E21B /* AudioCircularBuffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B34A195240D4FEE0043E21B /* AudioCircularBuffer.cc */; };
8B34A1A7240D501E0043E21B /* AgoraMediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B34A1A5240D501E0043E21B /* AgoraMediaPlayer.framework */; };
8B34A1A8240D501E0043E21B /* AgoraRtcEngineKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B34A1A6240D501E0043E21B /* AgoraRtcEngineKit.framework */; };
8B34A1AB240D50540043E21B /* AgoraMediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B34A1A9240D50540043E21B /* AgoraMediaPlayer.framework */; };
8B34A1AC240D50540043E21B /* AgoraRtcEngineKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B34A1AA240D50540043E21B /* AgoraRtcEngineKit.framework */; };
8B34A1AD240D508E0043E21B /* AgoraMediaPlayer.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8B34A1A9240D50540043E21B /* AgoraMediaPlayer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8B5FB30A239123A00025B0C1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B5FB309239123A00025B0C1 /* AppDelegate.m */; };
8B5FB30D239123A00025B0C1 /* ViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8B5FB30C239123A00025B0C1 /* ViewController.mm */; };
Expand Down Expand Up @@ -72,6 +74,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
6751F24A24F6554A0013D341 /* AgoraRtcKit.framework in Embed Frameworks */,
8B34A1AD240D508E0043E21B /* AgoraMediaPlayer.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
Expand All @@ -83,6 +86,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
6751F24624F655230013D341 /* AgoraRtcKit.framework in Embed Frameworks */,
8BFAD63024F3BE0200F6A633 /* AgoraFFmpeg.framework in Embed Frameworks */,
8B1D6DF424D1789A0061E782 /* AgoraMediaPlayer.framework in Embed Frameworks */,
);
Expand All @@ -92,6 +96,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
6751F24324F6551F0013D341 /* AgoraRtcKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraRtcKit.framework; path = ../../../../helper/apple/RtcChannelPublishPlugin/ios/AgoraRtcKit.framework; sourceTree = "<group>"; };
6751F24724F655360013D341 /* AgoraRtcKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraRtcKit.framework; path = ../../../../helper/apple/RtcChannelPublishPlugin/mac/AgoraRtcKit.framework; sourceTree = "<group>"; };
8B2EE99C2394B5A9009FD6DD /* player_demo_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = player_demo_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
8B2EE99E2394B5A9009FD6DD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
8B2EE99F2394B5A9009FD6DD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand All @@ -109,9 +115,7 @@
8B34A197240D4FEE0043E21B /* scoped_ptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scoped_ptr.h; sourceTree = "<group>"; };
8B34A198240D4FEE0043E21B /* template_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = template_util.h; sourceTree = "<group>"; };
8B34A1A5240D501E0043E21B /* AgoraMediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraMediaPlayer.framework; path = ../../../../helper/apple/RtcChannelPublishPlugin/ios/AgoraMediaPlayer.framework; sourceTree = "<group>"; };
8B34A1A6240D501E0043E21B /* AgoraRtcEngineKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraRtcEngineKit.framework; path = ../../../../helper/apple/RtcChannelPublishPlugin/ios/AgoraRtcEngineKit.framework; sourceTree = "<group>"; };
8B34A1A9240D50540043E21B /* AgoraMediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraMediaPlayer.framework; path = ../../../../helper/apple/RtcChannelPublishPlugin/mac/AgoraMediaPlayer.framework; sourceTree = "<group>"; };
8B34A1AA240D50540043E21B /* AgoraRtcEngineKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraRtcEngineKit.framework; path = ../../../../helper/apple/RtcChannelPublishPlugin/mac/AgoraRtcEngineKit.framework; sourceTree = "<group>"; };
8B5FB305239123A00025B0C1 /* player_demo_mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = player_demo_mac.app; sourceTree = BUILT_PRODUCTS_DIR; };
8B5FB308239123A00025B0C1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
8B5FB309239123A00025B0C1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -173,7 +177,6 @@
8B8163EF2396941C007625AA /* CoreTelephony.framework in Frameworks */,
8B8161DC239685B3007625AA /* libresolv.tbd in Frameworks */,
8B8161DA23968598007625AA /* libbz2.tbd in Frameworks */,
8B34A1A8240D501E0043E21B /* AgoraRtcEngineKit.framework in Frameworks */,
8B8161D823968570007625AA /* AVFoundation.framework in Frameworks */,
8B8161D623968564007625AA /* SystemConfiguration.framework in Frameworks */,
8B8161D423968550007625AA /* libz.tbd in Frameworks */,
Expand All @@ -182,6 +185,7 @@
8B8161D02396852A007625AA /* AudioToolbox.framework in Frameworks */,
8B8161CE23968523007625AA /* Accelerate.framework in Frameworks */,
8B8161CC239684F7007625AA /* CoreVideo.framework in Frameworks */,
6751F24524F655230013D341 /* AgoraRtcKit.framework in Frameworks */,
8B8161CA239684EB007625AA /* VideoToolbox.framework in Frameworks */,
8B8161C8239684E4007625AA /* MetalKit.framework in Frameworks */,
8B8161C6239684CE007625AA /* liblzma.tbd in Frameworks */,
Expand All @@ -200,11 +204,11 @@
8B815CFB23950369007625AA /* VideoToolbox.framework in Frameworks */,
8B815CF92395035F007625AA /* SystemConfiguration.framework in Frameworks */,
8B815CF723950353007625AA /* libresolv.tbd in Frameworks */,
8B34A1AC240D50540043E21B /* AgoraRtcEngineKit.framework in Frameworks */,
8B34A1AB240D50540043E21B /* AgoraMediaPlayer.framework in Frameworks */,
8B815CF523950349007625AA /* CoreWLAN.framework in Frameworks */,
8B815CF32395033F007625AA /* CoreMedia.framework in Frameworks */,
8B815CF123950338007625AA /* CoreAudio.framework in Frameworks */,
6751F24924F6554A0013D341 /* AgoraRtcKit.framework in Frameworks */,
8BAB522323D485D2003FB923 /* Accelerate.framework in Frameworks */,
8B815CEF2395032F007625AA /* AVFoundation.framework in Frameworks */,
8B815CED23950327007625AA /* AudioToolbox.framework in Frameworks */,
Expand All @@ -224,7 +228,7 @@
8B2EE9A22394B5AA009FD6DD /* ViewController.mm */,
8BFAD62E24F3BDE900F6A633 /* AgoraFFmpeg.framework */,
8B34A1A5240D501E0043E21B /* AgoraMediaPlayer.framework */,
8B34A1A6240D501E0043E21B /* AgoraRtcEngineKit.framework */,
6751F24324F6551F0013D341 /* AgoraRtcKit.framework */,
8B2EE9A42394B5AA009FD6DD /* Main.storyboard */,
8B2EE9A72394B5BD009FD6DD /* Assets.xcassets */,
8B2EE9A92394B5BD009FD6DD /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -286,7 +290,7 @@
8B5FB30B239123A00025B0C1 /* ViewController.h */,
8B5FB30C239123A00025B0C1 /* ViewController.mm */,
8B34A1A9240D50540043E21B /* AgoraMediaPlayer.framework */,
8B34A1AA240D50540043E21B /* AgoraRtcEngineKit.framework */,
6751F24724F655360013D341 /* AgoraRtcKit.framework */,
8B5FB30E239123A30025B0C1 /* Assets.xcassets */,
8B5FB310239123A40025B0C1 /* Main.storyboard */,
8B5FB313239123A40025B0C1 /* Info.plist */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import "ViewController.h"
#include <AgoraMediaPlayer/AgoraMediaPlayerKit.h>
#include <AgoraRtcEngineKit/AgoraRtcEngineKit.h>
#include <AgoraRtcKit/AgoraRtcEngineKit.h>
#import "AgoraRtcChannelPublishHelper.h"
@interface ViewController()<AgoraMediaPlayerDelegate,AgoraRtcChannelPublishHelperDelegate,AgoraRtcEngineDelegate>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -23,7 +23,7 @@
<constraint firstAttribute="height" constant="328" id="rzv-P2-Sd4"/>
</constraints>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="http://compress.mv.letusmix.com/1c4dbe546537a9459d7b2c208d513303.mp4" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="Lnf-Dz-RZ2">
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="https://www.runoob.com/try/demo_source/mov_bbb.mp4" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="Lnf-Dz-RZ2">
<rect key="frame" x="87" y="84" width="240" height="68"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "ViewController.h"
#import <AgoraMediaPlayer/AgoraMediaPlayerKit.h>
#import "AgoraRtcChannelPublishHelper.h"
#include <AgoraRtcEngineKit/AgoraRtcEngineKit.h>
#include <AgoraRtcKit/AgoraRtcEngineKit.h>

@interface ViewController ()<AgoraMediaPlayerDelegate,AgoraRtcChannelPublishHelperDelegate,AgoraRtcEngineDelegate>
{
Expand Down Expand Up @@ -137,7 +137,12 @@ - (IBAction)openMediaFile:(UIButton *)sender {
if ([self.inputTextView.text isEqualToString:@""]) {
return;
}
NSString *filePath = [[[NSBundle mainBundle] pathForResource:@"resources" ofType:@"bundle"] stringByAppendingPathComponent:@"84.mp4"];

// NSString *filePath = [[[NSBundle mainBundle] pathForResource:@"resources" ofType:@"bundle"] stringByAppendingPathComponent:@"84.mp4"];

// Arlin: add url from net.
NSString *filePath = self.inputTextView.text ?: @"";

[_mediaPlayerKit open:filePath startPos:0];

}
Expand Down