패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소flutterwtf/VR-Player

VR 플레이어

VrPlayer 플러그인을 사용하면 Android 및 iOS 플랫폼에서 360도 및 VR 비디오를 부드럽게 재생할 수 있습니다

VR 플레이어 프로젝트 이미지
스타
40
포크
21
최근 푸시(UTC)
2025. 3. 11.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

VrPlayer

What the Flutter

Crafted with passion by What the Flutter 🦜

Pub Build Status CodeFactor


Getting Started

Based on Kaltura Playkit SDK:

The VrPlayer plugin lets you play 360° and VR videos smoothly on Android and iOS platforms, delivering an immersive viewing experience with touch and device motion controls. These types of videos, commonly referred to as immersive, 360, or spherical videos, are captured by utilizing an omnidirectional camera or multiple cameras to record the entire panoramic view simultaneously.

Usage

VrPlayer(
  x: 0,
  y: 0,
  onCreated: onViewPlayerCreated,
  width: playerWidth,
  height: playerHeight,
),

You should implement onViewPlayerCreated to receive player events.

void onViewPlayerCreated(
  VrPlayerController controller,
  VrPlayerObserver observer,
) {
  _viewPlayerController = controller;
  observer
    ..onStateChange = onReceiveState
    ..onDurationChange = onReceiveDuration
    ..onPositionChange = onChangePosition
    ..onFinishedChange = onReceiveEnded;
  _viewPlayerController.loadVideo(
    videoUrl:
        'https://cdn.bitmovin.com/content/assets/playhouse-vr/m3u8s/105560.m3u8',
  );
}
VrPlayerController

The VrPlayerController can be used to change the state of a VrPlayer. Note that the methods can only be used after the VrPlayer has been created.

Method Description
loadVideo({String? videoUrl, String? videoPath}) Initializes video based on configuration. Invoke actions which need to be run on player start. Pass videoPath to load local files, or videoUrl to play files from network. Local files supports only Android.
isPlaying() Check current player state.
play() Play video.
pause() Pause video.
seekTo() Seek to position.
setVolume() Set video volume level from 0 (no sound) to 1 (max).
fullScreen() (Android only) Enable/disable fullscreen mode. On IOS you need to pass new width and height to VrPlayer widget
toggleVRMode() Switch between 360° mode and VR mode.
onSizeChanged() (Android only) Reload player when you need to change size of nativeView.
onPause() (Android only) Dispose player on pause.
onResume() (Android only) Reload player.
onOrientationChanged() (Android only) Notily player when orientation changed.
Local Files Guide (Android only)

Working with video from storage is a bit difficult than from the Internet. Follow the instructions bellow to launch local files correctly.

  1. Add <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> to the file AndroidmManifest.xml.
  2. Request permission to read external storage from user.
  3. Call loadVideo() with correct videoPath.

License Information

All code in this project is released under the AGPLv3 license unless a different license for a particular library is specified in the applicable library path.

Contribution

This repository welcomes contributions from the community! Whether you're looking to fix bugs, improve existing features, or add new ones, we would be happy to review and merge your contributions.

What the Flutter GitHub avatar
GitHub 작성자

What the Flutter ↗

Leading Flutter development agency 🚀

언어DartKotlinSwiftRubyObjective-C

분류

사용 중인 의존성

의존성 목록 4 개

  • flutter{"sdk":"flutter"}
  • dart_code_metrics개발 의존성^5.7.6
  • flutter_test개발 의존성{"sdk":"flutter"}
  • very_good_analysis개발 의존성^7.0.0

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗