admin
2021-09-03 b41a6efe17ba61d150c5a9b7309651cebae54e0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.yeshi.buwan.util.video;
 
import com.yeshi.buwan.domain.HomeVideo;
import com.yeshi.buwan.util.NumberUtil;
 
public class VideoUtil {
 
    /**
     * 根据视频ID获取视频来源的类型
     *
     * @param id
     * @return
     */
    public static int getVideoFromType(String id) {
 
        if (NumberUtil.isNumeric(id)) {
            return HomeVideo.FROM_TYPE_LOCAL;
        } else {
            if (id.startsWith("s-")) {
                return HomeVideo.FROM_TYPE_SHORT;
            } else {
                return HomeVideo.FROM_TYPE_INTERNET;
            }
        }
 
    }
 
}