Swiftpack.co - bambuser/bambuser-livevideoshoppingplayer-sdk-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
bambuser/bambuser-livevideoshoppingplayer-sdk-ios
This SDK helps you add a Bambuser live shopping player to your UIKit and SwiftUI apps.
.package(url: "https://github.com/bambuser/bambuser-livevideoshoppingplayer-sdk-ios.git", from: "0.5.0")

Bambuser Live Video Shopping Player (Beta)

About

BambuserLiveVideoShoppingPlayer lets you add a Bambuser Live Video Shopping (LVS) Player to your app.

The LVS player can be used to watch live and recorded shows, with UI overlays that lets users interact with the show.

The LVS player can be configured to great extent and also lets you listen for player emitted events and perform player-specific functions.

BambuserLiveVideoShoppingPlayer supports iOS 13+ and can be used with UIKit and SwiftUI.

Beta Version

This project is in an early stage of development. Feel free to experiment with it, but refrain from using it in production.

See the release notes for status and progress.

Installation

Swift Package Manager

https://github.com/bambuser/bambuser-livevideoshoppingplayer-sdk-ios

After installing the SDK, you must import BambuserVideoLiveShoppingPlayer in every file where you want to use it.

CocoaPods/Carthage

This SDK does not support or Carthage.

Getting started

Documentation

You can download the latest DocC documentation here.

Just extract the downloaded file and double-tap the .doccarchive file to view the documentation in Xcode.

UIKit

With UIKit, you can create a player like this:

let player = LiveVideoShoppingPlayerView(
    showId: "The ID of the show to watch",
    configuration: playerConfiguration)

You can then add the player anywhere in your app, resize it to fit your needs etc.

SwiftUI

With SwiftUI, you can create a player like this:

let player = LiveVideoShoppingPlayer(
    showId: "The ID of the show to watch",
    configuration: playerConfiguration)

You can then add the player anywhere in your app, resize it to fit your needs etc.

Player Configuration

You can use a PlayerConfiguration to configure the player instance.

Read more here to learn about how to configure the player, UI overlays, event listeners etc.

Player Events

The player will emit PlayerEventInfo values to the event handler that you inject into the player configuration.

Read more here to learn about listening for events, extracting data etc.

Picture-in-Picture

Bambuser Live Video Shopping Player supports native picture-in-picture (referred to as PiP in the text below).

Read more here to learn about manual and automatic PiP enabling, PiP restoration etc.

Demo apps

The Demo folder contains a SwiftUI and a UIKit demo app.

Have a look at these apps for examples on how to add a live shopping player to your app and configure it, handle PiP etc.

GitHub

link
Stars: 1
Last commit: 4 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

3 weeks ago

This version improves picture-in-picture (PiP) support.

PiP players will now stay alive even if the user leaves the player screen. This makes in-app navigation possible while PiP is active.

It is now also possible to restore a PiP player that has left its source screen.

This release also renames and makes many nested player configuration types non-nested.

✨ New features

  • LiveVideoShoppingPlayer has made showId and configuration public, to simplify PiP restoration.
  • LiveVideoShoppingPlayerInterface invoke replaces PlayerUIPresenter and the showUI and hideUI functions.
  • PictureInPictureConfiguration is a new configuration used by the PlayerConfiguration, to configure how PiP behaves.
  • PictureInPictureRestoreComponent can be implemented by any class that wants to listen to PiP restore events.
  • PictureInPictureRestoreModifier is a new SwiftUI view modifier that can be used to handle PiP restore events.
  • pictureInPictureRestore is a new SwiftUI view extension that applies a PictureInPictureRestoreModifier to the view.
  • PlayerConfiguration has a new pipConfig parameter and property.
  • PlayerEvent.showProductView is now emitted even if you haven't responded to the .provideProductData event.
  • PlayerFunction is a new enum that describes player-specific functionality.
  • View has a new pictureInPictureRestore modifier that can be used to listen to PiP restore events.
  • UIView and UIViewController has a new registerPictureInPictureRestoreAction function that can be used to register a PiP restore event listener.

💡 Behavior changes

  • An active picture-in-picture player will no longer die when you leave the screen that started it.

🗑 Deprecated

  • LiveVideoShoppingPlayerInterface showUI and hideUI are deprecated and will be removed in 0.6.
  • PlayerButtonConfiguration is deprecated and will be removed in 0.6.
  • PlayerButtonConfiguration.LinkConfig is deprecated and will be removed in 0.6.
  • PlayerConfiguration isViewerSubscribed has been moved to a PlayerViewerInfo struct.
  • PlayerConfiguration.ButtonConfiguration has been renamed to PlayerButtonConfiguration.
  • PlayerConfiguration.EnabledState has been renamed to PlayerEnabledState.
  • PlayerConfiguration.LocaleInfo has been renamed to PlayerLocaleInfo.
  • PlayerConfiguration.ShareConfiguration has been renamed to PlayerShareConfiguration.
  • PlayerConfiguration.StreamerInfo has been renamed to PlayerStreamerInfo.
  • PlayerConfiguration.UIConfiguration has been renamed to PlayerUIConfiguration.
  • PlayerConfiguration.UIState has been renamed to PlayerOverlayVisiblity.
  • PlayerUIPresenter is deprecated and will be removed in 0.6.

💥 Breaking changes

  • ButtonConfiguration dismissConfig was not used and has been removed.
  • LiveVideoShoppingPlayerViewController is no longer public.
  • PlayerButtonConfiguration.DismissConfig was not used and has been removed.
  • PlayerConfiguration no longer has a buttons configuration option.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics