All Projects → 0x0c → Lmmediaplayer

0x0c / Lmmediaplayer

Licence: mit
A video and audio player with replaceable UI component.

Projects that are alternatives of or similar to Lmmediaplayer

Swift Radio Pro
Professional Radio Station App for iOS!
Stars: ✭ 2,644 (+1344.81%)
Mutual labels:  audio, player, audio-player
Fradioplayer
A simple radio player framework for iOS, macOS, tvOS.
Stars: ✭ 183 (+0%)
Mutual labels:  audio, player, audio-player
Jcplayer
🎵 A simple audio player for Android applications.
Stars: ✭ 209 (+14.21%)
Mutual labels:  audio, player, audio-player
Freemp
Free Media Player (FreeMp)
Stars: ✭ 97 (-46.99%)
Mutual labels:  audio, player, audio-player
Audioplayers
A Flutter plugin to play multiple audio files simultaneously (Android/iOS)
Stars: ✭ 1,042 (+469.4%)
Mutual labels:  audio, player, audio-player
React Music Player
🎵 Maybe the best beautiful HTML5 responsive player component for react :)
Stars: ✭ 321 (+75.41%)
Mutual labels:  audio, player, audio-player
React Native Sound Player
Play sound file in ReactNative
Stars: ✭ 144 (-21.31%)
Mutual labels:  audio, player, audio-player
Skplayer
🎵 A simple & beautiful HTML5 music player
Stars: ✭ 437 (+138.8%)
Mutual labels:  audio, player, audio-player
React Cassette Player
Simple ReactJS HTML5 audio player component built with SVG icons from The Noun Project.
Stars: ✭ 93 (-49.18%)
Mutual labels:  audio, player, audio-player
Sbplayerclient
支持全格式的mac版视频播放器
Stars: ✭ 110 (-39.89%)
Mutual labels:  audio, player, audio-player
Min Vid
Popout video player in Firefox
Stars: ✭ 180 (-1.64%)
Mutual labels:  audio, player
React Jplayer
Html5 audio and video player library for React
Stars: ✭ 128 (-30.05%)
Mutual labels:  audio, audio-player
Amplipi
Whole House Audio System 🔊
Stars: ✭ 125 (-31.69%)
Mutual labels:  audio, audio-player
Persistentstreamplayer
Stream audio over http, and persist the data to a local file while buffering
Stars: ✭ 120 (-34.43%)
Mutual labels:  audio, player
Timecat
A Magical Web Recorder & Player 🖥
Stars: ✭ 1,955 (+968.31%)
Mutual labels:  audio, player
Pinlayout
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Stars: ✭ 1,870 (+921.86%)
Mutual labels:  ios-lib, ios-ui
Calendarkit
📅 Calendar for Apple platforms in Swift
Stars: ✭ 2,049 (+1019.67%)
Mutual labels:  ios-lib, ios-ui
Vime
Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
Stars: ✭ 1,928 (+953.55%)
Mutual labels:  audio, player
Musicplayer
A minimal music player built on electron.
Stars: ✭ 145 (-20.77%)
Mutual labels:  audio, player
Green Audio Player
Audio Player javascript library
Stars: ✭ 151 (-17.49%)
Mutual labels:  audio, audio-player

LMMediaPlayer

[![CI Status](http://img.shields.io/travis/Akira Matsuda/LMMediaPlayer.svg?style=flat)](https://travis-ci.org/Akira Matsuda/LMMediaPlayer) Version License Platform

LMMediaPlayer is a video and an audio player for iPhone with replaceable user interface.

Requirements

  • Runs on iOS 6.0 or later.

Contribution

Please use clang-format and use .clang-format file which is containing this repo.

Installation

LMMediaPlayer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LMMediaPlayer"

Usage

You can play MPMediaItem and http streaming contents with fullscreen or non-fullscreen mode.

//Get shared player
LMMediaPlayerView *player = [LMMediaPlayerView sharedPlayerView];

//Create media item with URL.
LMMediaItem *item1 = [[LMMediaItem alloc] initWithInfo:@{
	LMMediaItemInfoURLKey:[NSURL URLWithString:@"video or audio url"],
	LMMediaItemInfoContentTypeKey:@(LMMediaItemContentTypeVideo)
}];

//Create media item with MPMediaItem.
MPMediaItem *mediaItem =
LMMediaItem *item2 = [[LMMediaItem alloc] initWithMetaMedia:mediaItem contentType:LMMediaItemContentTypeVideo];

//Add queue.
[player.mediaPlayer addMedia:item1];
[player.mediaPlayer addMedia:item2];

//Play it!
[player.mediaPlayer play];

without player view.

//Get shared player
LMMediaPlayer *player = [LMMediaPlayer sharedPlayer];

//Create media item with URL.
LMMediaItem *item1 = [[LMMediaItem alloc] initWithInfo:@{
	LMMediaItemInfoURLKey:[NSURL URLWithString:@"video or audio url"],
	LMMediaItemInfoContentTypeKey:@(LMMediaItemContentTypeVideo)
}];

//Create media item with MPMediaItem.
MPMediaItem *mediaItem =
LMMediaItem *item2 = [[LMMediaItem alloc] initWithMetaMedia:mediaItem contentType:LMMediaItemContentTypeVideo];

//Add queue.
[player addMedia:item1];
[player addMedia:item2];

//Play it!
[player play];

Already implemented repeat mode and shuffle mode.

LMMediaPlayerView *player = [LMMediaPlayerView sharedPlayerView];
player.mediaPlayer.repeatMode = LMMediaRepeatModeNone;
player.mediaPlayer.repeatMode = LMMediaRepeatModeAll;
player.mediaPlayer.repeatMode = LMMediaRepeatModeOne;

[player.mediaPlayer setShuffleEnabled:YES];

To change user interface, use setButtonImages: and set images with these keys.

Keys
LMMediaPlayerViewPlayButtonImageKey
LMMediaPlayerViewPlayButtonSelectedImageKey
LMMediaPlayerViewStopButtonImageKey
LMMediaPlayerViewStopButtonSelectedImageKey
LMMediaPlayerViewFullscreenButtonImageKey
LMMediaPlayerViewFullscreenButtonSelectedImageKey
LMMediaPlayerViewUnfullscreenButtonImageKey
LMMediaPlayerViewUnfullscreenButtonSelectedImageKey
LMMediaPlayerViewShuffleButtonShuffledImageKey
LMMediaPlayerViewShuffleButtonShuffledSelectedImageKey
LMMediaPlayerViewShuffleButtonUnshuffledImageKey
LMMediaPlayerViewShuffleButtonUnshuffledSelectedImageKey
LMMediaPlayerViewRepeatButtonRepeatOneImageKey
LMMediaPlayerViewRepeatButtonRepeatOneSelectedImageKey
LMMediaPlayerViewRepeatButtonRepeatAllImageKey
LMMediaPlayerViewRepeatButtonRepeatAllSelectedImageKey
LMMediaPlayerViewRepeatButtonRepeatNoneImageKey
LMMediaPlayerViewRepeatButtonRepeatNoneSelectedImageKey
LMMediaPlayerViewActionButtonImageKey

To show action button, set image with LMMediaPlayerViewActionButtonImageKey.

Use the following helper method for customising the progress bar:

[[LMMediaPlayerView sharedPlayerView] setProgressBarBorderColor:[UIColor whiteColor]
                                                    backgroundColor:[UIColor clearColor]
                                                          fillColor:[UIColor lightGrayColor]
                                                      minTrackColor:[UIColor redColor]
                                                     thumbTintColor:[UIColor whiteColor]];

Use the following helper method for customising the progress bar thumb:

[[LMMediaPlayerView sharedPlayerView] setProgressBarThumbImage:[UIImage imageNamed:@"thumb"]];

Of course, you can play video or audio in background mode and can control with control center. If you want to play with fullscreen mode, please add "View controller-based status bar appearance" key and set value with "NO" at your Info.plist

Author

Akira Matsuda, [email protected]

License

LMMediaPlayer is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].