package com.yeshi.video.player.util;
|
|
import android.content.Context;
|
|
import com.lcjian.library.util.common.FileUtils;
|
import com.lcjian.library.util.common.StringUtils;
|
|
import java.io.IOException;
|
import java.io.InputStream;
|
|
/**
|
* 播放器全屏
|
*/
|
public class PlayerFullScreenUtil {
|
|
private static String getJSContent(Context context, String name) {
|
try {
|
InputStream inputStream = context.getAssets().open(name);
|
return StringUtils.convertStreamToString(inputStream);
|
} catch (IOException e) {
|
e.printStackTrace();
|
}
|
return "";
|
}
|
|
/**
|
* 风行全屏JS代码
|
*
|
* @return
|
*/
|
public static String getFunShionFullScreenJS(Context context) {
|
return getJSContent(context, "player_funshion.js");
|
}
|
|
|
/**
|
* 获取Acfun全屏代码
|
*
|
* @return
|
*/
|
public static String getAcfunFullScreenJS(Context context) {
|
return getJSContent(context, "player_acfun.js");
|
}
|
|
|
}
|