Skip to content

Commit

Permalink
1、升级版本
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyJingFish committed Nov 21, 2024
1 parent e2b79b1 commit 9936d13
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@
import com.google.android.exoplayer2.DefaultLoadControl;
import com.google.android.exoplayer2.DefaultRenderersFactory;
import com.google.android.exoplayer2.LoadControl;
import com.google.android.exoplayer2.RenderersFactory;
import com.google.android.exoplayer2.mediacodec.MediaCodecInfo;
import com.google.android.exoplayer2.mediacodec.MediaCodecSelector;
import com.google.android.exoplayer2.mediacodec.MediaCodecUtil;
import com.google.android.exoplayer2.util.MimeTypes;
import com.shuyu.gsyvideoplayer.GSYVideoBaseManager;
import com.shuyu.gsyvideoplayer.player.IPlayerManager;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import tv.danmaku.ijk.media.exo2.Exo2PlayerManager;
import tv.danmaku.ijk.media.exo2.IjkExo2MediaPlayer;
import tv.danmaku.ijk.media.player.IMediaPlayer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import androidx.annotation.Nullable;

import com.flyjingfish.openimagelib.utils.ScreenUtils;
import com.shuyu.gsyvideoplayer.utils.Debuger;


public class OpenImageVideoPlayer extends OpenImageCoverVideoPlayer {
Expand All @@ -30,7 +29,6 @@ public OpenImageVideoPlayer(Context context, AttributeSet attrs) {
@Override
protected void init(Context context) {
super.init(context);
mTextureViewContainer = findViewById(R.id.surface_container_drawable);
}

@Override
Expand All @@ -46,28 +44,8 @@ public void setOnLongClickListener(@Nullable OnLongClickListener l) {
@Override
public void onClick(View v) {
super.onClick(v);
if (v.getId() == R.id.surface_container_drawable && mCurrentState == CURRENT_STATE_ERROR) {
if (!mSurfaceErrorPlay) {
onClickUiToggle(null);
return;
}
if (mVideoAllCallBack != null) {
Debuger.printfLog("onClickStartError");
mVideoAllCallBack.onClickStartError(mOriginUrl, mTitle, this);
}
prepareVideo();
}else if (v.getId() == R.id.surface_container_drawable) {
if (v.getId() == R.id.surface_container) {
onClickUiToggle(null);
if (mVideoAllCallBack != null && isCurrentMediaListener()) {
if (mIfCurrentIsFullscreen) {
Debuger.printfLog("onClickBlankFullscreen");
mVideoAllCallBack.onClickBlankFullscreen(mOriginUrl, mTitle, OpenImageVideoPlayer.this);
} else {
Debuger.printfLog("onClickBlank");
mVideoAllCallBack.onClickBlank(mOriginUrl, mTitle, OpenImageVideoPlayer.this);
}
}
startDismissControlViewTimer();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,17 @@ public int getIntrinsicHeight(){
return intrinsicHeight;
}

@Override
public void setOnTouchListener(OnTouchListener l) {
}

@Override
public void setOnClickListener(@Nullable OnClickListener l) {

}

@Override
public void setOnLongClickListener(@Nullable OnLongClickListener l) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public PhotoViewAttacher getAttacher() {
}

public ScaleDrawable getDrawable(){
return findViewById(R.id.surface_container_drawable);
return findViewById(R.id.surface_container);
}

public void setImageMatrix(Matrix matrix) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class VideoPlayerFragment extends BaseImageFragment<LoadingView> {
protected PhotoView photoImageView;
protected LoadingView loadingView;
protected OpenImageGSYVideoHelper gsyVideoHelper;
/**
* 设置为true表示视频可以缩放,设置为false表示视频不可缩放恢复为之前到设置
*/
public static boolean Scaling = true;

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:scaleType="fitCenter" />

<com.flyjingfish.openimagefulllib.ScaleDrawable
android:id="@+id/surface_container_drawable"
android:id="@+id/surface_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,18 @@ allprojects {

```gradle
//OpenImageFullLib 默认已经包含了OpenImageGlideLib
implementation 'io.github.FlyJingFish.OpenImage:OpenImageFullLib:2.2.8'
implementation 'io.github.FlyJingFish.OpenImage:OpenImageFullLib:2.2.9'
```

- 使用 Coil 作为图片加载器,如果你的项目组存在[Coil](https://github.com/coil-kt/coil)请升级至 **2.4.0** 或者更高的版本,否则会冲突

```gradle
//OpenImageFullLib 因为已经包含了 OpenImageGlideLib,所以需要排除掉 OpenImageGlideLib,否则会同时存在 Glide 和 Coil
implementation ('io.github.FlyJingFish.OpenImage:OpenImageFullLib:2.2.8'){
implementation ('io.github.FlyJingFish.OpenImage:OpenImageFullLib:2.2.9'){
exclude module: 'OpenImageGlideLib'
}
//OpenImageCoilLib 引入Coil(2.4.0)图片引擎
implementation 'io.github.FlyJingFish.OpenImage:OpenImageCoilLib:2.2.8'
implementation 'io.github.FlyJingFish.OpenImage:OpenImageCoilLib:2.2.9'
```

#### B、引入只带有图片引擎的版本(只支持查看图片)
Expand All @@ -109,14 +109,14 @@ implementation 'io.github.FlyJingFish.OpenImage:OpenImageCoilLib:2.2.8'

```gradle
//OpenImageGlideLib 引入Glide(4.12.0)图片引擎,没有引入视频播放器;如需定制视频播放功能,详细看Wiki文档,如果不想定制可直接使用上边的库
implementation 'io.github.FlyJingFish.OpenImage:OpenImageGlideLib:2.2.8'
implementation 'io.github.FlyJingFish.OpenImage:OpenImageGlideLib:2.2.9'
```

- 使用 Coil 作为图片加载器,如果你的项目组存在[Coil](https://github.com/coil-kt/coil)请升级至 **2.4.0** 或者更高的版本,否则会冲突

```gradle
//OpenImageCoilLib 引入Coil(2.4.0)图片引擎,没有引入视频播放器;如需定制视频播放功能,详细看Wiki文档,如果不想定制可直接使用上边的库
implementation 'io.github.FlyJingFish.OpenImage:OpenImageCoilLib:2.2.8'
implementation 'io.github.FlyJingFish.OpenImage:OpenImageCoilLib:2.2.9'
```

#### C、引入基础版本(不可以直接查看图片和视频,完全需要自定义)
Expand All @@ -126,7 +126,7 @@ implementation 'io.github.FlyJingFish.OpenImage:OpenImageCoilLib:2.2.8'
```gradle
//OpenImageLib 是基础库,没有引入图片引擎和视频播放器
//至少需要实现BigImageHelper来定制您的图片引擎,如需定制视频播放功能,详细看Wiki文档
implementation 'io.github.FlyJingFish.OpenImage:OpenImageLib:2.2.8'
implementation 'io.github.FlyJingFish.OpenImage:OpenImageLib:2.2.9'
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DEVELOPER_ID=FlyJingFish
DEVELOPER_NAME=FlyJingFish
DEVELOPER_EMAIL=[email protected]

TestVersion = 2.2.8
TestVersion = 2.2.9
SonatypeTestCode = 1333
TestType = 0
# 0 mavenLocal 1 SonatypeCache 2 mavenCentral
9 changes: 9 additions & 0 deletions update_record.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# OpenImage 更新日志

## 2.2.9

1、新增可以缩放视频的功能,默认是打开此功能,设置如下设置可以恢复到之前

```java
VideoPlayerFragment.Scaling = false;

```

## 2.2.8

1、修复超大图是旋转后的图片时加载错误问题
Expand Down
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Mon Oct 21 15:25:44 CST 2024
PROJ_VERSION=2.2.8
#Thu Nov 21 18:33:32 CST 2024
PROJ_VERSION=2.2.9

0 comments on commit 9936d13

Please sign in to comment.