Skip to content

Simple Video Player app with a framework which can be imported and used to add Video view to the UI

Notifications You must be signed in to change notification settings

SensehacK/VideoPlayer_Basic

Repository files navigation

VideoPlayer_Basic_Framework

Simple Video Player app with a framework which can be imported and used to add Video view to the UI. The Video will auto play.

There are two functions exposed with respective documentation in their own framework files.

Documentation Link

Demo

simulator

Quirks

iOS 16.4 simulator doesn't display video output for HLS streams. Should work fine for physical devices and previous iOS simulators. Thread Simulator Bug

Config

Minimum deployment target shifted to 15.0 due to a bug on iOS 16.4 3 different type of videos for testing.

Swift DocC command line

Local Build

xcodebuild docbuild \
    -scheme BasicAVPlayer \
    -destination 'name=iPhone 14 Pro' \
    -derivedDataPath ./build

Github Pages build

xcodebuild docbuild -scheme BasicAVPlayer \
-destination generic/platform=iOS \
OTHER_DOCC_FLAGS="--transform-for-static-hosting --output-path docs --hosting-base-path VideoPlayer_Basic"

Export

Releases

XcFramework

To Generate archive for iOS framework

Generic iOS

xcodebuild archive \
-scheme BasicAVPlayer \
-destination "generic/platform=iOS" \
-archivePath ../output/BasicAVPlayer-iOS \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES

Simulator

xcodebuild archive \
-scheme BasicAVPlayer \
-destination "generic/platform=iOS Simulator" \
-archivePath ../output/BasicAVPlayer-Sim \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES

Xc Framework export

xcodebuild -create-xcframework \
-framework ./BasicAVPlayer-iOS.xcarchive/Products/Library/Frameworks/BasicAVPlayer.framework \
-framework ./BasicAVPlayer-Sim.xcarchive/Products/Library/Frameworks/BasicAVPlayer.framework \
-output ./BasicAVPlayer.xcframework