Skip to content

[1P Packages] Update code samples of packages that use video_player in their examples.  #127754

Description

@gabrielokura

Since flutter/packages#3513 is adding a new URI-typed factory method, the following packages needs to update it's deprecated examples:

  • camera/camera
  • camera/camera_android
  • camera/camera_android_camerax
  • camera/camera_avfoundation
  • image_picker/image_picker
  • image_picker/image_picker_android
  • image_picker/image_picker_ios

The fix should be similar to this code

// deprecated
final VideoPlayerController vController = kIsWeb
        ? VideoPlayerController.network(videoFile!.path)
        : VideoPlayerController.file(File(videoFile!.path));
        
// fixed
final VideoPlayerController vController = kIsWeb
        ? VideoPlayerController.networkUrl(Uri.parse(videoFile!.path))
        : VideoPlayerController.file(File(videoFile!.path));

Also, this update will fix the analyze's tests:

[31mThe following packages had errors:�[0m
[31m  camera/camera�[0m
[31m  camera_android�[0m
[31m  camera_android_camerax�[0m
[31m  camera_avfoundation�[0m
[31m  image_picker/image_picker�[0m
[31m  image_picker_android�[0m
[31m  image_picker_ios�[0m
[31mSee above for full details.�[0m

Activity

  1. changed the title [-][video_player] Update deprecated examples [/-] [+][1P Packages] Update code samples of packages that use video_player in their examples. [/+] on May 29, 2023
  2. added
    packageflutter/packages repository. See also p: labels.
    and removed
    in triagePresently being triaged by the triage team
    on May 29, 2023
  3. added
    P2Important issues not at the top of the work list
    c: tech-debtTechnical debt, code quality, testing, etc.
    on Jun 13, 2023
  4. stuartmorgan-g commented on Jun 13, 2023

    @stuartmorgan-g
    Contributor

    Triaging under the expectation of the linked PR landing; it's not valid until that PR does land however.

  5. added
    P1High-priority issues at the top of the work list
    and removed
    P2Important issues not at the top of the work list
    on Jun 22, 2023
  6. flutter-triage-bot commented on Dec 11, 2023

    @flutter-triage-bot

    This issue is marked P1 but has had no recent status updates.

    The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.

    Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!

  7. github-actions commented on Dec 27, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.d: examplesSample code and demosp: cameraThe camera pluginp: image_pickerThe Image Picker plugin.packageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions