-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes
More file actions
152 lines (93 loc) · 3.9 KB
/
Copy pathNotes
File metadata and controls
152 lines (93 loc) · 3.9 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Kata Rules:
One activity, it just does NEW
Event bus (ie message orientated programming)
Tell dont ask, in fact you cant ask - except in the ui layer :)
No mocking frameworks
Dependency injection in fragments
Messages:
User wants to load a video at a url
User wants to pause
User wants to play (un pause)
User wants to seek to a position
Media is ready to play (loaded)
Media has started playing
Media has started paused
Media playback position (time) has changed
Media has finished
User leaves the app
User returns to the app
User exits the app
User wants to restart the media
user sends a query for media into the system
Objects:
User ??
Media player
Rule - auto start media on load
next steps: 23/12/13
implement a screen with a button and text box.
text box is prepopulated with the video url but can be overwritten
when the button is pressed the "User wants to load a video at url" event is dispatched
attached to the event is the value from the text box as a payload
The navigation controller will have to be changed,
the default navigation now is to show this new screen
the video player screen should be shown in response to the user load event
Wiring up the domain:
need to be authenticated
user service, can "authenticate" to and get a user back
A programme
programme repository, can search, is it a user search? ie need a user object and search criteria
A programme stream, retrievable from programme repo?
MID REFACTOR:
going to pull presenters, navigation controllers and screen interfaces into CORE project.
need to wrap the dependencies service with a test to check its assembled correctly, consider an intergrated test to replace the current injection tests
need to pull the navigation controllers factory out into its own object
Features to implement:
Select search result
nav controller responding to MEDIA_ITEM_AVAILABLE
Full page view needs to query the currentResult
Images
Remembers Query, in sql DB
Rehydrates query on APP_RESUME
Current Query getter?
Remembers Search Results
Rehydrates search results on APP_RESUME, or we re-dispatch query?
----- redux media repository
MediaRepository < #ReduxSearch
- responds to the execute query message
asks the ReduxUser for a token
builds a request url using the token and query object
asks the request for the response
returns the response
ReduxSearchRequest
- initialise
creates a new json request and constructs the url string
- execute
this puts it on the request queue but uses a future to block
ReduxUser
- responds to token message
two states
: valid expired token (not too old)
: Asks redux for a new token
asks the UserAccount for the U/P
builds a request using the user account details
saves the response token
-----
A request builder, takes the correctly formatted url and listener object
we invoke the listener object with a JSON object (or array)
--------
A new screen for the media player:
we have a new fragment:
it inflates the layout
it creates the presenter that attaches the RenderedVideo to the target ViewGroup
We need a whole new media player view generated to attach to the screen - the current one is AndroidMediaPlayerVideoOutput
It will still implement RenderedVideoOutput
It will have a AndroidMediaPlayerVideoOutput
It will have a VideoScreenAndroidView
It will need the existing presenters for the VideoScreen and the VideoOutput
It will need to inflate the videoplayer.xml file
We could do an integrated test of the fragment, assert the view is visible.
When the event is announced, is that object is attached correctly on the screen.
The object adds a text view to the screen, or tags the viewgroup? <- tags the viewgroup
First step, write an integrated test that asserts the correct view is displayed
and when the bus event happens the expected viewgroup is tagged with the success object
- then refactor into a seperate view class and controller (unless its already composed)