Giter Site home page Giter Site logo

Comments (3)

newtaDev avatar newtaDev commented on May 21, 2024 1

Thanks for filing the issue. Can you please share the steps to reproduce the issue.

from pod_player.

Cosminnv avatar Cosminnv commented on May 21, 2024

Download the example app and do these changes:

from_vimeo_id.dart

import 'package:flutter/material.dart';

class PlayVideoFromVimeoId extends StatefulWidget {
  const PlayVideoFromVimeoId({Key? key}) : super(key: key);

  @override
  State<PlayVideoFromVimeoId> createState() => _PlayVideoFromVimeoIdState();
}

class _PlayVideoFromVimeoIdState extends State<PlayVideoFromVimeoId> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Vimeo Player')),
      body: SafeArea(
        child: Center(
          child: ListView.separated(
            itemCount: 25,
            separatorBuilder: (ctx, index) {
              return const SizedBox(
                height: 10,
              );
            },
            itemBuilder: (ctx, index) {
              return const VideoItem();
            },
            shrinkWrap: true,
          ),
        ),
      ),
    );
  }
}

video_item.dart

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

class VideoItem extends StatefulWidget {
  const VideoItem({Key? key}) : super(key: key);

  @override
  State<VideoItem> createState() => _VideoItemState();
}

class _VideoItemState extends State<VideoItem>
    with AutomaticKeepAliveClientMixin {
  late final PodPlayerController controller;

  @override
  bool get wantKeepAlive => true;


  @override
  void dispose() {
    super.dispose();
    controller.dispose();
  }

  @override
  void initState() {
    controller = PodPlayerController(
      podPlayerConfig: const PodPlayerConfig(wakelockEnabled: true,autoPlay: false),
      playVideoFrom: PlayVideoFrom.vimeo('306495342'),
    )..initialise();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    super.build(context);
    return PodVideoPlayer(
      controller: controller,
      alwaysShowProgressBar: false,
    );
  }
}

This only happens on iOS

from pod_player.

newtaDev avatar newtaDev commented on May 21, 2024

To play list of videos please refer this example
https://github.com/newtaDev/pod_player/blob/master/example/lib/examples/play_list_of_videos.dart

from pod_player.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.