Back to Gsyvideoplayer

Hosting Methods

doc/DEPENDENCIES_EN.md

12.1.07.8 KB
Original Source

Hosting Methods

Click to see the Chinese version

There are currently three hosting methods:

  • MavenCentral: Available after version 11.0.0, all base class packages are published and hosted here.
  • Github Package: Available from version 9.1.0, but before version 11.0.0, the basic dependencies of GSYIjkJava are still hosted on jitpack.
  • Jitpack IO: Will continue to be released, but there is a random loss of packages on the hosting platform.

Since jitpack keeps losing packages, it has been migrated to MavenCentral. The usage is as follows:

First Add

groovy
allprojects {
    repositories {
        ///...
        mavenCentral()
        maven { url "https://maven.aliyun.com/repository/public" }
    }
}

You can choose one of the following three and add it to the build.gradle under the module.

A. Direct Introduction

groovy
 //Complete version introduction

implementation 'io.github.carguo:gsyvideoplayer:12.1.0'


//Whether AliPlayer mode is needed
implementation 'io.github.carguo:gsyvideoplayer-aliplay:12.1.0'

B. Add java and the so support you want:

groovy
 implementation 'io.github.carguo:gsyvideoplayer-java:12.1.0'

 //Whether ExoPlayer mode is needed
 implementation 'io.github.carguo:gsyvideoplayer-exo2:12.1.0'

 //Whether AliPlayer mode is needed
 implementation 'io.github.carguo:gsyvideoplayer-aliplay:12.1.0'

 //so of ijk mode according to your needs
 implementation 'io.github.carguo:gsyvideoplayer-arm64:12.1.0'
 implementation 'io.github.carguo:gsyvideoplayer-armv7a:12.1.0'
 implementation 'io.github.carguo:gsyvideoplayer-armv5:12.1.0'
 implementation 'io.github.carguo:gsyvideoplayer-x86:12.1.0'
 implementation 'io.github.carguo:gsyvideoplayer-x64:12.1.0'

C. Support other format protocols (mpeg, rtsp, concat, crypto protocols, support 16k Page Size)

A and B normal versions support 263/264/265, etc. For mpeg encoding, there will be sound but no picture. The so introduced by C supports mpeg encoding and other supplementary protocols, but the so package is relatively larger.

groovy
 implementation 'io.github.carguo:gsyvideoplayer-java:12.1.0'

 //Whether ExoPlayer mode is needed
 implementation 'io.github.carguo:gsyvideoplayer-exo2:12.1.0'

 //Whether AliPlayer mode is needed
 implementation 'io.github.carguo:gsyvideoplayer-aliplay:12.1.0'

 //More ijk encoding support
 implementation 'io.github.carguo:gsyvideoplayer-ex_so:12.1.0'

Since Jitpack often has the problem of random loss of historical packages, a new Github Package dependency method is added. The usage is as follows:

However, accessing github package requires a token to access, which is more troublesome, but it is stable.

groovy
allprojects {
    repositories {
		//...
        maven {
            url 'https://maven.pkg.github.com/CarGuo/GSYVideoPlayer'

            // You can also use your own GitHub account and token
            // For convenience, I have provided a token for an infrequently used account here
            credentials {
                // your github name
                username = 'carsmallguo'
                // your github generate new token
                password = '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'
            }
        }
        maven {
            url "https://maven.aliyun.com/repository/public"
        }
        mavenCentral()
    }
}

In theory, it is the avatar in the upper right corner - Settings - Developer Settings - Personal access tokens - tokens (classic) - Generate new token (classic) - read:packages Remember to choose permanent for the expiration time

You can choose one of the following three and add it to the build.gradle under the module.

A. Direct Introduction

groovy
 //Complete version introduction
 implementation 'com.shuyu:gsyvideoplayer:12.1.0'


 //Whether AliPlayer mode is needed
 implementation 'com.shuyu:gsyvideoplayer-aliplay:12.1.0'

B. Add java and the so support you want:

groovy
 implementation 'com.shuyu:gsyvideoplayer-java:12.1.0'

 //Whether ExoPlayer mode is needed
 implementation 'com.shuyu:gsyvideoplayer-exo2:12.1.0'

 //Whether AliPlayer mode is needed
 implementation 'com.shuyu:gsyvideoplayer-aliplay:12.1.0'

 //so of ijk mode according to your needs
 implementation 'com.shuyu:gsyvideoplayer-armv5:12.1.0'
 implementation 'com.shuyu:gsyvideoplayer-armv7a:12.1.0'
 implementation 'com.shuyu:gsyvideoplayer-arm64:12.1.0'
 implementation 'com.shuyu:gsyvideoplayer-x86:12.1.0'
 implementation 'com.shuyu:gsyvideoplayer-x64:12.1.0'

C. Support other format protocols (mpeg, rtsp, concat, crypto protocols, support 16k Page Size)

A and B normal versions support 263/264/265, etc. For mpeg encoding, there will be sound but no picture. The so introduced by C supports mpeg encoding and other supplementary protocols, but the so package is relatively larger.

groovy
 implementation 'com.shuyu:gsyvideoplayer-java:12.1.0'

 //Whether ExoPlayer mode is needed
 implementation 'com.shuyu:gsyvideoplayer-exo2:12.1.0'


 //Whether AliPlayer mode is needed
 implementation 'com.shuyu:gsyvideoplayer-aliplay:12.1.0'

 //More ijk encoding support
 implementation 'com.shuyu:gsyvideoplayer-ex_so:12.1.0'

Historical packages may have random packet loss, and it is not easy to supplement, see #4144:

First, add in the build.gradle under the project

groovy
allprojects {
    repositories {
		//...
        maven { url 'https://jitpack.io' }
        maven { url "https://maven.aliyun.com/repository/public" }
        mavenCentral()
    }
}

You can choose one of the following three and add it to the build.gradle under the module.

A. Direct Introduction

groovy
 //Complete version introduction

 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer:v12.1.0'


 //Whether AliPlayer mode is needed
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-aliplay:v12.1.0'

B. Add java and the so support you want:

groovy
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-java:v12.1.0'

 //Whether ExoPlayer mode is needed
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-exo2:v12.1.0'

 //Whether AliPlayer mode is needed
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-aliplay:v12.1.0'

 //so of ijk mode according to your needs
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-arm64:v12.1.0'
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-armv7a:v12.1.0'
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-armv5:v12.1.0'
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-x86:v12.1.0'
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-x64:v12.1.0'

C. Support other format protocols (mpeg, rtsp, concat, crypto protocols, support 16k Page Size)

A and B normal versions support 263/264/265, etc. For mpeg encoding, there will be sound but no picture. The so introduced by C supports mpeg encoding and other supplementary protocols, but the so package is relatively larger.

groovy
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-java:v12.1.0'

 //Whether ExoPlayer mode is needed
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-exo2:v12.1.0'

 //Whether AliPlayer mode is needed
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-aliplay:v12.1.0'

 //More ijk encoding support
 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-ex_so:v12.1.0'