Setup VOD viewing in 15 minutes in your iOS project instead of 7 days of work and setting network, smooth scrolling, upload parameters etc. This demo project is a quick tutorial how to view video from your own mobile app to an audience of 1 000 000+ views like Instagram, Youtube, etc.
- HLS playback,
- Upload new video via TUSKit,
- authorization on Gcore services,
- Support for smooth scrolling.
- Launching the application via xcode (it must be run on a real device, since the simulator does not support the camera),
- Authorization via email and password of the personal account in Gcore,
- On the viewing screen, you can start viewing VOD with smooth scrolling,
- On the upload screen, you can start record and push video on the Gcore.
Clone this project and try it or create a new one.
-
Library
a) TUSKit - To perform asynchronous video upload to the server, we recommend using version 2.2.1
This version makes it easy to use metadata to send files. You can easily add via SPM specifying git libraries with the version. b) Texture - To perform asynchronous UI, and smooth scrolling via table node realization. -
Permissions
To use the camera and microphone, you need to request the user's permission for this. To do this, add to the plist (Info) of the project: Privacy - Camera Usage Description and Privacy - Microphone Usage Description.Also, to record sound in the background, you need to add a background mode - "Audio, AirPlay and Picture in Picture"
-
Gcore API To interact with the server, the HTTPCommunicator structure is used, through the API:
enum GcoreAPI: String {
case authorization = "https://api.gcore.com/iam/auth/jwt/login"
case videos = "https://api.gcore.com/streaming/videos"
case refreshToken = "https://api.gcore.com/iam/auth/jwt/refresh"
}
Which create the necessary request through the HTTPCommunicator struct. For more check Gcore API documentation.
- iOS min - 12.1,
- Real device (not simulator),
- The presence of an Internet connection on the device,
- The presence of a camera and microphone on the device.
Copyright 2022 Gcore Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.