admin
2020-08-12 cefe2a41db4a275fb1e940a902cb156f1ed68d80
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
/*
 * Copyright (c) 2013 Sohu TV. All rights reserved.
 */
package com.weikou.beibeivideo.ui.sohuutils;
 
import android.app.Activity;
 
import com.sohuvideo.api.SohuPlayerItemBuilder;
 
public class ControllerFactory {
    public static SohuControllerWindow createController(Activity ctx, int from) {
        switch (from) {
            case SohuPlayerItemBuilder.TYPE_ONLIVE_VIDEO_SOHU:
                return new SohuControllerWindow(ctx);
            case SohuPlayerItemBuilder.TYPE_LIVE_VIDEO_SOHU:
            case SohuPlayerItemBuilder.TYPE_LIVE_VIDEO_URL:
                return new LiveControllerPopWindow(ctx);
            case SohuPlayerItemBuilder.TYPE_ONLIVE_VIDEO_URL:
            case SohuPlayerItemBuilder.TYPE_LOCAL_VIDEO_URL:
            case SohuPlayerItemBuilder.TYPE_LOCAL_VIDEO_DOWNLOAD:
                return new LocalControllerPopWindow(ctx);
            default:
                break;
        }
        return null;
    }
}