Pakete, Repositories und App-Kategorien suchen

Paketdetailsv1.2.0

flutter_cast_video

flutter_cast_video ermöglicht die Entdeckung von Cast-Geräten wie Chromecast und Apple TV sowie deren Verbindung.

AndroidiOS
30-Tage-Downloads
213
Likes
35
Pub-Punkte
140

Paket installieren

flutter pub add flutter_cast_video

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

flutter_cast_video ist ein Flutter-Paket, das die Entdeckung und Verbindung mit Casting-Geräten wie Chrome Cast und Apple TV ermöglicht. Es erlaubt Benutzern, Medieninhalte aus ihren mobilen Apps auf kompatible Displays zu streamen und so die Wiedergabeerfahrung auf größeren Bildschirmen zu verbessern. Das Paket unterstützt sowohl Android als auch iOS und bietet Entwicklern eine nahtlose Integration für die Hinzufügung von Casting-Funktionen in ihre Anwendungen. Mit minimalem Setup über pub add vereinfacht es den Geräteerkennungs- und Streaming-Prozess.

Anwendungsfälle

  • Videos auf Smart-TVs streamen
  • Remote-Wiedergabe auf dem Apple TV aktivieren
  • Integration von Casting in Medien-Apps
  • Unterstützung der Mehrgeräteübertragung
  • Erlauben Sie die Live-Inhalts-Spiegelung
  • Die Förderung von Heimunterhaltungs-Apps

Hauptmerkmale

  • Gerätesuche für Chromecast und Apple TV
  • Plattformübergreifende Unterstützung (Android & iOS)
  • Einfache Integration mit pub add
  • Echtzeit-Wiedergabefunktionen
  • Eingebaute Verbindungsverwaltung
  • sichere Streaming-Protokolle

Geeignet für

  • Medien- und Video-Streaming-Anwendungen
  • Smart-Home-Unterhaltungssysteme
  • Bildungs- oder Präsentationsanwendungen
  • Apps für die Ansicht auf großen Bildschirmen
  • Entwickler fügen Casting-Funktionen schnell hinzu

Hinweise

  • Kompatible Übertragungsgeräte erforderlich
  • Netzwerkverbindung unerlässlich
  • Beschränkt auf unterstützte Plattformen
  • Könnte zusätzliche Berechtigungen erfordern
  • Abhängig von der Geräteverfügbarkeit
  • Der Benutzer muss das Zielgerät manuell auswählen

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

flutter_cast_video

This is a clone and enhanced version from fluter_video_cast

A Flutter plugin for iOS and Android for connecting to cast devices like Chromecast and Apple TV.

Installation

First, add flutter_cast_video as a dependency in your pubspec.yaml file.

iOS

Set the minimum os target to iOS 11.0.

Initialize the Cast context in the application delegate ios/Runner/AppDelegate.m:

import UIKit
import Flutter
import GoogleCast

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate, GCKLoggerDelegate {
    let kReceiverAppID = kGCKDefaultMediaReceiverApplicationID
    let kDebugLoggingEnabled = true

    override func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        GeneratedPluginRegistrant.register(with: self)
        let criteria = GCKDiscoveryCriteria(applicationID: kReceiverAppID)
        let options = GCKCastOptions(discoveryCriteria: criteria)
        GCKCastContext.setSharedInstanceWith(options)
        GCKCastContext.sharedInstance().useDefaultExpandedMediaControls = true
        GCKLogger.sharedInstance().delegate = self
        return super.application(application, didFinishLaunchingWithOptions: launchOptions)
    }
}

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.

Android

Add dependencies in your module (app-level) Gradle file (usually android/app/build.gradle):

implementation 'com.google.android.gms:play-services-cast-framework:19.0.0'
implementation 'com.google.android.exoplayer:extension-cast:2.11.5'

Set the theme of the MainActivity to @style/Theme.AppCompat.NoActionBar in the application manifest android/app/src/main/AndroidManifest.xml:

<manifest ...
  <application ...
    <meta-data android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
               android:value="com.google.android.exoplayer2.ext.cast.DefaultCastOptionsProvider"/>
    ...
    <activity android:theme="@style/Theme.AppCompat.NoActionBar" ...

Make MainActivity extends FlutterFragmentActivity and initialize the Cast context:

CastContext.getSharedInstance(applicationContext)
Both

You can now add a ChromeCastButton widget to your widget tree.

The button can be controlled with the ChromeCastController that is passed to the ChromeCastButton's onButtonCreated callback.

import 'package:flutter/material.dart';
import 'package:flutter_cast_video/flutter_cast_video.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: CastSample(),
    );
  }
}


class CastSample extends StatefulWidget {
  @override
  _CastSampleState createState() => _CastSampleState();
}

class _CastSampleState extends State<CastSample> {
  ChromeCastController _controller;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Cast Sample'),
        actions: [
          ChromeCastButton(
            onButtonCreated: (controller) {
              setState(() => _controller = controller);
              _controller?.addSessionListener();
            },
            onSessionStarted: () {
              _controller?.loadMedia('https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4');
            },
          ),
        ],
      ),
    );
  }
}

See the example directory for a complete sample app.

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.