Introduction
Brightcove provides a solution for delivering video to China from outside the country. The solution is comprised of two parts:
- A proxy server hosted within China
- A connected China-specific CDN
The proxy routes non-video traffic (Playback API requests, Analytics beacons, and the web player itself) to and from viewers in China to Brightcove infrastructure located outside.
The CDN is connected to the proxy and handles the video and image content.
Requirements
The following requirements are needed for China Delivery with the Brightcove Native SDKs:
Setup
-
There are setup requirements in addition to configuring your player
For details, see Overview: China Delivery
Device OS version
- iOS 11.0 and newer
Brightcove SDK version
- The Android Native SDK is not supported
- Native SDK for iOS 6.5.0 and newer
iOS Implementation
The BCOVGlobalConfiguration class allows you to set custom configurations for the Native SDK for iOS.
Within this class, set the chinaProxyDomain property to a custom, fully qualified domain name (FQDN) for the Playback API, metrics and analytics collection services.
@property (nonatomic, nullable) NSString *chinaProxyDomain
To use China Delivery, follow these steps
Swift
-
Review the VideoCloudBasicPlayer sample.
-
In the
ViewController.swift
file, before you create thesharedSDKManager
, add a variable forchinaProxyDomain
as follows:class ViewController: UIViewController { let setChinaProxyDomain: () = BCOVGlobalConfiguration.sharedConfig().chinaProxyDomain = "your host domain" let sharedSDKManager = BCOVPlayerSDKManager.shared()
Objective-C
-
Review the VideoCloudBasicPlayer sample.
-
In the
ViewController.m
file, add a variable forchinaProxyDomain
as follows:- (instancetype)initWithCoder:(NSCoder *)coder { BCOVGlobalConfiguration.sharedConfig.chinaProxyDomain = @"your host domain"; self = [super initWithCoder:coder]; if (self) { [self setup]; } return self; }
Custom players
To support Brightcove China Delivery with a custom player, you must update how it connects to Brightcove from within China Delivery.
The Playback API endpoint hostname must be changed from edge.api.brightcove.com
to yourdomain.cn
. Here is an example:
The following endpoint:
https://edge.api.brightcove.com/playback/v1/accounts/123450001/videos/543210001
Would become:
https://videos.yourdomain.cn/playback/v1/accounts/123450001/videos/543210001
The Data Collection API hostname must be changed from from metrics.brightcove.com
to yourdomain.cn
. Here is an example:
The following endpoint:
https://metrics.brightcove.com/v2/tracker?event=video_view&domain=videocloud&account=123&video=789
Would become:
https://videos.yourdomain.cn/v2/tracker?event=video_view&domain=videocloud&account=123&video=789
In the examples shown above videos.yourdomain.cn
is the ICP-licensed and active hostname configured for the China Delivery account.
Limitations
For details about the limitations for this feature, see the Overview: China Delivery document.