Giter Site home page Giter Site logo

youtube-player-kotlin-app's Introduction

YouTube Player Application using Kotlin



  • In this project we will learn how to integrate and play a video using YouTube API in Android with Kotlin.

  • The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications.

  • The API defines methods for loading and playing YouTube videos (and playlists) and for customizing and controlling the video playback experience.

  • Using the API, you can load or cue videos into a player view embedded in your application’s UI. You can then control playback programmatically. For example, you can play, pause, or seek to a specific point in the currently loaded video.

  • You can also register event listeners to get callbacks for certain events, such as the player loading a video or the player state changing. Finally, the API has helper functionality to support orientation changes as well as transitions to fullscreen playback.

Creating an Android Project:

Step 1- Creating a new file project with an empty activity



Go to Files Create a New Project Select a Project Template- Basic Activity

Step 2- Setting up YouTube Library and Manifest

In this part, we will see how to set up the YouTube API Client library for the project.



Go to YouTube Android Player API and download YouTube Android Player API jar file
Extract the jar files and add them to the “libs” folder. Integration of YouTube Android Player in Screen using Kotlin

Step 1: Go to Google Developer Console — https://console.developers.google.com/apis/library/

Step 2: Enable YouTube Data API



Step 3: Go to “Help me choose” option



Step 4: Select the credentials as shown below



Step 5: Go to Credentials











  1. In the place of “Name” enter your package name
  2. Generate the SHA-1 certificate fingerprint by running “signingReport”
  3. Copy the generated SHA-1 certificate fingerprint and place it as shown above

youtube-player-kotlin-app's People

Contributors

mitushaa avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.